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 org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo;
19  import org.kuali.student.r2.lum.clu.infc.Accreditation;
20  //import org.w3c.dom.Element;
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  import java.io.Serializable;
28  import java.util.Date;
29  import java.util.List;
30  
31  /**
32   * Accreditation information
33   *
34   * @Version 2.0
35   * @Author Sri komandur@uw.edu
36   */
37  @XmlAccessorType(XmlAccessType.FIELD)
38  @XmlType(name = "AccreditationInfo", propOrder = {"id", "orgId", "effectiveDate", "expirationDate", "attributes", "meta" , "_futureElements" }) 
39  public class AccreditationInfo extends HasAttributesAndMetaInfo implements Accreditation, Serializable {
40  
41      private static final long serialVersionUID = 1L;
42  
43      @XmlElement
44      private String id;
45      @XmlElement
46      private String orgId;
47      @XmlElement
48      private Date effectiveDate;
49      @XmlElement
50      private Date expirationDate;
51      @XmlAnyElement
52      private List<Object> _futureElements;  
53  
54      public AccreditationInfo() {
55      }
56  
57      public AccreditationInfo(Accreditation accreditation) {
58          super(accreditation);
59          if (null != accreditation) {
60              this.id = accreditation.getId();
61              this.orgId = accreditation.getOrgId();
62              this.effectiveDate = (null != accreditation.getEffectiveDate()) ? new Date(accreditation.getEffectiveDate().getTime()) : null;
63              this.expirationDate = (null != accreditation.getExpirationDate()) ? new Date(accreditation.getExpirationDate().getTime()) : null;
64          }
65      }
66  
67      @Override
68      public String getId() {
69          return id;
70      }
71  
72      public void setId(String id) {
73          this.id = id;
74      }
75  
76      @Override
77      public String getOrgId() {
78          return orgId;
79      }
80  
81      public void setOrgId(String orgId) {
82          this.orgId = orgId;
83      }
84  
85      @Override
86      public Date getEffectiveDate() {
87          return effectiveDate;
88      }
89  
90      public void setEffectiveDate(Date effectiveDate) {
91          this.effectiveDate = effectiveDate;
92      }
93  
94      @Override
95      public Date getExpirationDate() {
96          return expirationDate;
97      }
98  
99      public void setExpirationDate(Date expirationDate) {
100         this.expirationDate = expirationDate;
101     }
102 
103 }