1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.kuali.student.enrollment.lrr.dto; |
12 | |
|
13 | |
import java.io.Serializable; |
14 | |
import java.util.ArrayList; |
15 | |
import java.util.Collections; |
16 | |
import java.util.List; |
17 | |
|
18 | |
import javax.xml.bind.annotation.XmlAccessType; |
19 | |
import javax.xml.bind.annotation.XmlAccessorType; |
20 | |
import javax.xml.bind.annotation.XmlAnyElement; |
21 | |
import javax.xml.bind.annotation.XmlElement; |
22 | |
import javax.xml.bind.annotation.XmlType; |
23 | |
|
24 | |
import org.kuali.student.enrollment.lrr.infc.LearningResultRecord; |
25 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
26 | |
import org.w3c.dom.Element; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
@XmlAccessorType(XmlAccessType.FIELD) |
32 | |
@XmlType(name = "LearningResultRecordInfo", propOrder = {"id", "name", "descr", "typeKey", "stateKey", "lprId", "resultValueKey", "resultSourceIds", "meta", "attributes", "_futureElements"}) |
33 | |
public class LearningResultRecordInfo extends IdEntityInfo implements LearningResultRecord, Serializable { |
34 | |
|
35 | |
private static final long serialVersionUID = 1L; |
36 | |
|
37 | |
@XmlElement |
38 | |
private String lprId; |
39 | |
|
40 | |
@XmlElement |
41 | |
private String resultValueKey; |
42 | |
|
43 | |
@XmlElement |
44 | |
private List<String> resultSourceIds; |
45 | |
|
46 | |
@XmlAnyElement |
47 | |
private List<Element> _futureElements; |
48 | |
|
49 | |
public LearningResultRecordInfo() { |
50 | 0 | super(); |
51 | 0 | this.lprId = null; |
52 | 0 | this.resultValueKey = null; |
53 | 0 | this.resultSourceIds = new ArrayList<String>(); |
54 | 0 | } |
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
public LearningResultRecordInfo(LearningResultRecord lrr) { |
62 | 0 | super(lrr); |
63 | |
|
64 | 0 | this.lprId = lrr.getLprId(); |
65 | 0 | this.resultValueKey = lrr.getResultValueKey(); |
66 | |
|
67 | 0 | resultSourceIds = new ArrayList<String>(); |
68 | |
|
69 | 0 | Collections.copy(resultSourceIds, lrr.getResultSourceIds()); |
70 | |
|
71 | 0 | } |
72 | |
|
73 | |
@Override |
74 | |
public String getLprId() { |
75 | 0 | return lprId; |
76 | |
} |
77 | |
|
78 | |
@Override |
79 | |
public String getResultValueKey() { |
80 | 0 | return resultValueKey; |
81 | |
} |
82 | |
|
83 | |
@Override |
84 | |
public List<String> getResultSourceIds() { |
85 | 0 | if (null == resultSourceIds) { |
86 | 0 | resultSourceIds = new ArrayList<String>(0); |
87 | |
} |
88 | 0 | return resultSourceIds; |
89 | |
} |
90 | |
|
91 | |
public void setLprId(String lprId) { |
92 | 0 | this.lprId = lprId; |
93 | 0 | } |
94 | |
|
95 | |
public void setResultValueKey(String resultValueId) { |
96 | 0 | this.resultValueKey = resultValueId; |
97 | 0 | } |
98 | |
|
99 | |
public void setResultSourceIds(List<String> resultSourceIds) { |
100 | 0 | this.resultSourceIds = resultSourceIds; |
101 | 0 | } |
102 | |
} |