View Javadoc

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          super();
37          resultValueInfos = new ArrayList<ResultValueInfo>();
38          resultValueRange = null;
39      }
40  
41      public GradeValuesGroupInfo(GradeValuesGroup gradeValuesGroup) {
42          super(gradeValuesGroup);
43          if (gradeValuesGroup != null) {
44              resultValueInfos = new ArrayList<ResultValueInfo>();
45              if (gradeValuesGroup.getResultValueInfos() != null) {
46                  for (ResultValueInfo resultValue : gradeValuesGroup.getResultValueInfos()) {
47                      resultValueInfos.add(new ResultValueInfo(resultValue));
48                  }
49              }
50  
51              resultValueRange = new ResultValueRangeInfo(resultValueRange);
52          }
53  
54      }
55  
56      @Override
57      public List<ResultValueInfo> getResultValueInfos() {
58          return resultValueInfos;
59      }
60  
61      public void setResultValueInfos(List<ResultValueInfo> resultValueInfos) {
62          this.resultValueInfos = resultValueInfos;
63      }
64  
65      @Override
66      public ResultValueRangeInfo getResultValueRange() {
67          return resultValueRange;
68      }
69  
70      public void setResultValueRange(ResultValueRangeInfo resultValueRange) {
71          this.resultValueRange = resultValueRange;
72      }
73  
74  }