1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.lum.lu.dto; |
17 | |
|
18 | |
import org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo; |
19 | |
import org.kuali.student.r2.lum.lu.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 | |
|
33 | |
|
34 | |
|
35 | |
|
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<Element> _futureElements; |
53 | |
|
54 | 0 | public AccreditationInfo() { |
55 | 0 | } |
56 | |
|
57 | |
public AccreditationInfo(Accreditation accreditation) { |
58 | 0 | super(accreditation); |
59 | 0 | if (null != accreditation) { |
60 | 0 | this.id = accreditation.getId(); |
61 | 0 | this.orgId = accreditation.getOrgId(); |
62 | 0 | this.effectiveDate = (null != accreditation.getEffectiveDate()) ? new Date(accreditation.getEffectiveDate().getTime()) : null; |
63 | 0 | this.expirationDate = (null != accreditation.getExpirationDate()) ? new Date(accreditation.getExpirationDate().getTime()) : null; |
64 | |
} |
65 | 0 | } |
66 | |
|
67 | |
@Override |
68 | |
public String getId() { |
69 | 0 | return id; |
70 | |
} |
71 | |
|
72 | |
public void setId(String id) { |
73 | 0 | this.id = id; |
74 | 0 | } |
75 | |
|
76 | |
@Override |
77 | |
public String getOrgId() { |
78 | 0 | return orgId; |
79 | |
} |
80 | |
|
81 | |
public void setOrgId(String orgId) { |
82 | 0 | this.orgId = orgId; |
83 | 0 | } |
84 | |
|
85 | |
@Override |
86 | |
public Date getEffectiveDate() { |
87 | 0 | return effectiveDate; |
88 | |
} |
89 | |
|
90 | |
public void setEffectiveDate(Date effectiveDate) { |
91 | 0 | this.effectiveDate = effectiveDate; |
92 | 0 | } |
93 | |
|
94 | |
@Override |
95 | |
public Date getExpirationDate() { |
96 | 0 | return expirationDate; |
97 | |
} |
98 | |
|
99 | |
public void setExpirationDate(Date expirationDate) { |
100 | 0 | this.expirationDate = expirationDate; |
101 | 0 | } |
102 | |
} |