View Javadoc

1   /*
2    * Copyright 2007 The Kuali Foundation Licensed under the Educational Community
3    * License, Version 1.0 (the "License"); you may not use this file except in
4    * compliance with the License. You may obtain a copy of the License at
5    * http://www.opensource.org/licenses/ecl1.php Unless required by applicable law
6    * or agreed to in writing, software distributed under the License is
7    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8    * KIND, either express or implied. See the License for the specific language
9    * governing permissions and limitations under the License.
10   */
11  package org.kuali.student.r2.lum.lrc.dto;
12  
13  import java.io.Serializable;
14  import java.util.Date;
15  import java.util.List;
16  
17  import javax.xml.bind.annotation.XmlAccessType;
18  import javax.xml.bind.annotation.XmlAccessorType;
19  import javax.xml.bind.annotation.XmlAnyElement;
20  import javax.xml.bind.annotation.XmlElement;
21  import javax.xml.bind.annotation.XmlType;
22  
23  import org.kuali.student.r2.common.dto.KeyEntityInfo;
24  import org.kuali.student.r2.lum.lrc.infc.ResultValue;
25  //import org.w3c.dom.Element;
26  
27  @XmlAccessorType(XmlAccessType.FIELD)
28  @XmlType(name = "ResultValueInfo", propOrder = {"key", "typeKey", "stateKey",
29          "name", "descr", "resultScaleKey", "numericValue", "value",
30          "effectiveDate", "expirationDate", "meta", "attributes" , "_futureElements" }) 
31          
32  public class ResultValueInfo extends KeyEntityInfo implements ResultValue,
33          Serializable {
34  
35      private static final long serialVersionUID = 1L;
36  
37      @XmlElement
38      private String resultScaleKey;
39  
40      @XmlElement
41      private String numericValue;
42  
43      @XmlElement
44      private String value;
45  
46      @XmlElement
47      private Date effectiveDate;
48  
49      @XmlElement
50      private Date expirationDate;
51  
52      @XmlAnyElement
53      private List<Object> _futureElements;  
54  
55      public ResultValueInfo() {
56          super();
57      }
58  
59      public ResultValueInfo(ResultValue resultValueInfo) {
60          super(resultValueInfo);
61          if (null != resultValueInfo) {
62              this.resultScaleKey = resultValueInfo.getResultScaleKey();
63              this.numericValue = resultValueInfo.getNumericValue();
64              this.value = resultValueInfo.getValue();
65              if (resultValueInfo.getEffectiveDate() != null) {
66                  this.effectiveDate = new Date(resultValueInfo.getEffectiveDate().getTime());
67              }
68              if (resultValueInfo.getExpirationDate() != null) {
69                  this.expirationDate = new Date(resultValueInfo.getExpirationDate().getTime());
70              }
71          }
72      }
73  
74      @Override
75      public String getResultScaleKey() {
76          return resultScaleKey;
77      }
78  
79      public void setResultScaleKey(String resultScaleKey) {
80          this.resultScaleKey = resultScaleKey;
81      }
82  
83      @Override
84      public String getNumericValue() {
85          return numericValue;
86      }
87  
88      public void setNumericValue(String numericValue) {
89          this.numericValue = numericValue;
90      }
91  
92      @Override
93      public String getValue() {
94          return value;
95      }
96  
97      public void setValue(String value) {
98          this.value = value;
99      }
100 
101     @Override
102     public Date getEffectiveDate() {
103         return effectiveDate;
104     }
105 
106     public void setEffectiveDate(Date effectiveDate) {
107         this.effectiveDate = effectiveDate;
108     }
109 
110     @Override
111     public Date getExpirationDate() {
112         return expirationDate;
113     }
114 
115     public void setExpirationDate(Date expirationDate) {
116         this.expirationDate = expirationDate;
117     }
118 }