1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
package org.kuali.student.enrollment.acal.dto; |
16 | |
|
17 | |
import java.io.Serializable; |
18 | |
import java.util.Date; |
19 | |
import java.util.ArrayList; |
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.enrollment.acal.infc.HolidayCalendar; |
29 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
30 | |
import org.w3c.dom.Element; |
31 | |
|
32 | |
@XmlAccessorType(XmlAccessType.FIELD) |
33 | |
@XmlType(name = "HolidayCalendarInfo", propOrder = { |
34 | |
"id", "typeKey", "stateKey", "name", "descr", |
35 | |
"campusKeys", "adminOrgId", "startDate", "endDate", |
36 | |
"meta", "attributes", "_futureElements" }) |
37 | |
|
38 | |
public class HolidayCalendarInfo |
39 | |
extends IdEntityInfo |
40 | |
implements HolidayCalendar, Serializable { |
41 | |
|
42 | |
private static final long serialVersionUID = 1L; |
43 | |
|
44 | |
@XmlElement |
45 | |
private List<String> campusKeys; |
46 | |
|
47 | |
@XmlElement |
48 | |
private String adminOrgId; |
49 | |
|
50 | |
@XmlElement |
51 | |
private Date startDate; |
52 | |
|
53 | |
@XmlElement |
54 | |
private Date endDate; |
55 | |
|
56 | |
@XmlAnyElement |
57 | |
private List<Element> _futureElements; |
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
|
63 | 0 | public HolidayCalendarInfo() { |
64 | 0 | } |
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
public HolidayCalendarInfo(HolidayCalendar holidayCalendar) { |
73 | 0 | super(holidayCalendar); |
74 | 0 | if (holidayCalendar != null) { |
75 | 0 | if (holidayCalendar.getCampusKeys() != null) { |
76 | 0 | campusKeys = new ArrayList<String>(holidayCalendar.getCampusKeys()); |
77 | |
} |
78 | |
|
79 | 0 | this.adminOrgId = holidayCalendar.getAdminOrgId(); |
80 | 0 | if (holidayCalendar.getStartDate() != null) { |
81 | 0 | this.startDate = new Date (holidayCalendar.getStartDate().getTime()); |
82 | |
} |
83 | |
|
84 | 0 | if (holidayCalendar.getEndDate() != null) { |
85 | 0 | this.endDate = new Date(holidayCalendar.getEndDate().getTime()); |
86 | |
} |
87 | |
} |
88 | 0 | } |
89 | |
|
90 | |
@Override |
91 | |
public List<String> getCampusKeys() { |
92 | 0 | if (campusKeys == null) { |
93 | 0 | campusKeys = new ArrayList<String>(); |
94 | |
} |
95 | |
|
96 | 0 | return campusKeys; |
97 | |
} |
98 | |
|
99 | |
public void setCampusKeys(List<String> campusKeys) { |
100 | 0 | this.campusKeys = campusKeys; |
101 | 0 | } |
102 | |
|
103 | |
@Override |
104 | |
public String getAdminOrgId() { |
105 | 0 | return adminOrgId; |
106 | |
} |
107 | |
|
108 | |
public void setAdminOrgId(String adminOrgId) { |
109 | 0 | this.adminOrgId = adminOrgId; |
110 | 0 | } |
111 | |
|
112 | |
@Override |
113 | |
public Date getStartDate() { |
114 | 0 | return startDate; |
115 | |
} |
116 | |
|
117 | |
public void setStartDate(Date startDate) { |
118 | 0 | this.startDate = startDate; |
119 | 0 | } |
120 | |
|
121 | |
@Override |
122 | |
public Date getEndDate() { |
123 | 0 | return endDate; |
124 | |
} |
125 | |
|
126 | |
public void setEndDate(Date endDate) { |
127 | 0 | this.endDate = endDate; |
128 | 0 | } |
129 | |
} |