View Javadoc

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