View Javadoc
1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.student.r2.lum.clu.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.IdNamelessEntityInfo;
29  import org.kuali.student.r2.common.dto.RichTextInfo;
30  import org.kuali.student.r2.lum.clu.infc.ResultOption;
31  
32  @XmlAccessorType(XmlAccessType.FIELD)
33  @XmlType(name = "ResultOptionInfo", propOrder = {"id", "descr", "typeKey", "stateKey", "resultUsageTypeKey", "resultComponentId", "effectiveDate",
34          "expirationDate", "meta", "attributes" , "_futureElements" }) 
35  public class ResultOptionInfo extends IdNamelessEntityInfo implements ResultOption, Serializable {
36  
37      private static final long serialVersionUID = 1L;
38  
39      @XmlElement
40      private RichTextInfo descr;
41  
42      @XmlElement
43      private String resultUsageTypeKey;
44  
45      @XmlElement
46      private String resultComponentId;
47  
48      @XmlElement
49      private Date effectiveDate;
50  
51      @XmlElement
52      private Date expirationDate;
53  
54      @XmlAnyElement
55      private List<Object> _futureElements;  
56  
57      public ResultOptionInfo() {
58  
59      }
60  
61      public ResultOptionInfo(ResultOption resultOption) {
62          super(resultOption);
63          if (null != resultOption) {
64              this.resultUsageTypeKey = resultOption.getResultUsageTypeKey();
65              this.resultComponentId = resultOption.getResultComponentId();
66              this.effectiveDate = (null != resultOption.getEffectiveDate()) ? new Date(resultOption.getEffectiveDate().getTime()) : null;
67              this.expirationDate = (null != resultOption.getExpirationDate()) ? new Date(resultOption.getExpirationDate().getTime()) : null;
68          }
69      }
70  
71      @Override
72      public RichTextInfo getDescr() {
73          return descr;
74      }
75  
76      public void setDescr(RichTextInfo descr) {
77          this.descr = descr;
78      }
79  
80      @Override
81      public String getResultUsageTypeKey() {
82          return resultUsageTypeKey;
83      }
84  
85      public void setResultUsageTypeKey(String resultUsageTypeKey) {
86          this.resultUsageTypeKey = resultUsageTypeKey;
87      }
88  
89      @Override
90      public String getResultComponentId() {
91          return resultComponentId;
92      }
93  
94      public void setResultComponentId(String resultComponentId) {
95          this.resultComponentId = resultComponentId;
96      }
97  
98      @Override
99      public Date getEffectiveDate() {
100         return effectiveDate;
101     }
102 
103     public void setEffectiveDate(Date effectiveDate) {
104         this.effectiveDate = effectiveDate;
105     }
106 
107     @Override
108     public Date getExpirationDate() {
109         return expirationDate;
110     }
111 
112     public void setExpirationDate(Date expirationDate) {
113         this.expirationDate = expirationDate;
114     }
115 
116 }