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.ArrayList;
20  import java.util.Date;
21  import java.util.List;
22  
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlAnyElement;
26  import javax.xml.bind.annotation.XmlAttribute;
27  import javax.xml.bind.annotation.XmlElement;
28  import javax.xml.bind.annotation.XmlType;
29  
30  import org.kuali.student.r2.common.dto.KeyEntityInfo;
31  import org.kuali.student.r2.lum.lrc.infc.ResultScale;
32  //import org.w3c.dom.Element;
33  
34  @XmlAccessorType(XmlAccessType.FIELD)
35  @XmlType(name = "ResultScaleInfo", propOrder = {
36          "key", "typeKey", "stateKey", "name", "descr", 
37          "resultValueRange", "effectiveDate", "expirationDate", 
38          "meta", "attributes" , "_futureElements" }) 
39  
40  public class ResultScaleInfo 
41          extends KeyEntityInfo 
42          implements ResultScale, Serializable {
43  
44      private static final long serialVersionUID = 1L;
45  
46      @XmlElement
47      private ResultValueRangeInfo resultValueRange;
48  
49      @XmlElement
50      private Date effectiveDate;
51  
52      @XmlElement
53      private Date expirationDate;
54  
55      @XmlAnyElement
56      private List<Object> _futureElements;  
57  
58      public ResultScaleInfo() {
59          super();
60      }
61  
62      public ResultScaleInfo(ResultScale orig) {
63          super(orig);
64          if (null != orig) {
65              if (orig.getResultValueRange() != null) {
66                  this.resultValueRange = new ResultValueRangeInfo(orig.getResultValueRange());
67              }
68              if (orig.getEffectiveDate() != null) {
69                  this.effectiveDate = new Date(orig.getEffectiveDate().getTime());
70              }
71              if (orig.getExpirationDate() != null) {
72                  this.expirationDate = new Date(orig.getExpirationDate().getTime());
73              }
74          }
75      }
76  
77      @Override    
78      public ResultValueRangeInfo getResultValueRange() {
79          return resultValueRange;
80      }
81  
82      public void setResultValueRange(ResultValueRangeInfo resultValueRange) {
83          this.resultValueRange = resultValueRange;
84      }
85  
86      @Override    
87      public Date getEffectiveDate() {
88          return effectiveDate;
89      }
90  
91      public void setEffectiveDate(Date effectiveDate) {
92          this.effectiveDate = effectiveDate;
93      }
94  
95      @Override    
96      public Date getExpirationDate() {
97          return expirationDate;
98      }
99  
100     public void setExpirationDate(Date expirationDate) {
101         this.expirationDate = expirationDate;
102     }
103 }