1 package com.atlassian.plugins.rest.sample.expansion.entity;
2
3 import com.atlassian.plugins.rest.common.expand.Expander;
4
5 import javax.xml.bind.annotation.XmlAccessorType;
6 import javax.xml.bind.annotation.XmlElement;
7 import javax.xml.bind.annotation.XmlRootElement;
8 import javax.xml.bind.annotation.XmlTransient;
9
10 import static javax.xml.bind.annotation.XmlAccessType.FIELD;
11
12
13
14
15 @XmlRootElement
16 @XmlAccessorType(FIELD)
17 @Expander(SubRecordExpander.class)
18 public class SubRecord {
19
20 @XmlElement
21 private Integer pointsScored;
22
23 @XmlTransient
24 private PlayerRecord playerRecord;
25
26 public static SubRecord emptySubRecord(PlayerRecord playerRecord) {
27 return new SubRecord(playerRecord);
28 }
29
30 public SubRecord() {
31 }
32
33 public SubRecord(final PlayerRecord playerRecord) {
34 this.playerRecord = playerRecord;
35 }
36
37 public SubRecord(int pointsScored) {
38 this.pointsScored = pointsScored;
39 }
40
41 public Integer getPointsScored() {
42 return pointsScored;
43 }
44
45 public void setPointsScored(Integer pointsScored) {
46 this.pointsScored = pointsScored;
47 }
48
49 public PlayerRecord getPlayerRecord() {
50 return playerRecord;
51 }
52 }