1 | |
package org.kuali.student.enrollment.grading.dto; |
2 | |
|
3 | |
import java.util.ArrayList; |
4 | |
import java.util.List; |
5 | |
|
6 | |
import javax.xml.bind.annotation.XmlAccessType; |
7 | |
import javax.xml.bind.annotation.XmlAccessorType; |
8 | |
import javax.xml.bind.annotation.XmlAnyElement; |
9 | |
import javax.xml.bind.annotation.XmlElement; |
10 | |
import javax.xml.bind.annotation.XmlType; |
11 | |
|
12 | |
import org.kuali.student.enrollment.grading.infc.GradeValuesGroup; |
13 | |
import org.kuali.student.r2.common.dto.KeyEntityInfo; |
14 | |
import org.kuali.student.r2.lum.lrc.dto.ResultValueInfo; |
15 | |
import org.kuali.student.r2.lum.lrc.dto.ResultValueRangeInfo; |
16 | |
import org.w3c.dom.Element; |
17 | |
|
18 | |
@XmlAccessorType(XmlAccessType.FIELD) |
19 | |
@XmlType(name = "GradeValuesGroupInfo", propOrder = {"key", "typeKey", "stateKey", "name", "descr", "resultValueInfos", |
20 | |
"resultValueRange", "meta", "attributes", "_futureElements"}) |
21 | |
public class GradeValuesGroupInfo extends KeyEntityInfo implements GradeValuesGroup { |
22 | |
|
23 | |
private static final long serialVersionUID = 1L; |
24 | |
|
25 | |
@XmlElement |
26 | |
private List<ResultValueInfo> resultValueInfos; |
27 | |
|
28 | |
@XmlElement |
29 | |
private ResultValueRangeInfo resultValueRange; |
30 | |
|
31 | |
@XmlAnyElement |
32 | |
private List<Element> _futureElements; |
33 | |
|
34 | |
public GradeValuesGroupInfo() { |
35 | |
|
36 | 0 | super(); |
37 | 0 | resultValueInfos = new ArrayList<ResultValueInfo>(); |
38 | 0 | resultValueRange = null; |
39 | 0 | } |
40 | |
|
41 | |
public GradeValuesGroupInfo(GradeValuesGroup gradeValuesGroup) { |
42 | 0 | super(gradeValuesGroup); |
43 | 0 | if (gradeValuesGroup != null) { |
44 | 0 | resultValueInfos = new ArrayList<ResultValueInfo>(); |
45 | 0 | if (gradeValuesGroup.getResultValueInfos() != null) { |
46 | 0 | for (ResultValueInfo resultValue : gradeValuesGroup.getResultValueInfos()) { |
47 | 0 | resultValueInfos.add(new ResultValueInfo(resultValue)); |
48 | |
} |
49 | |
} |
50 | |
|
51 | 0 | resultValueRange = new ResultValueRangeInfo(resultValueRange); |
52 | |
} |
53 | |
|
54 | 0 | } |
55 | |
|
56 | |
@Override |
57 | |
public List<ResultValueInfo> getResultValueInfos() { |
58 | 0 | return resultValueInfos; |
59 | |
} |
60 | |
|
61 | |
public void setResultValueInfos(List<ResultValueInfo> resultValueInfos) { |
62 | 0 | this.resultValueInfos = resultValueInfos; |
63 | 0 | } |
64 | |
|
65 | |
@Override |
66 | |
public ResultValueRangeInfo getResultValueRange() { |
67 | 0 | return resultValueRange; |
68 | |
} |
69 | |
|
70 | |
public void setResultValueRange(ResultValueRangeInfo resultValueRange) { |
71 | 0 | this.resultValueRange = resultValueRange; |
72 | 0 | } |
73 | |
|
74 | |
} |