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.List; |
20 | |
|
21 | |
import javax.xml.bind.annotation.XmlAccessType; |
22 | |
import javax.xml.bind.annotation.XmlAccessorType; |
23 | |
import javax.xml.bind.annotation.XmlAnyElement; |
24 | |
import javax.xml.bind.annotation.XmlElement; |
25 | |
import javax.xml.bind.annotation.XmlType; |
26 | |
|
27 | |
import org.kuali.student.enrollment.acal.infc.Holiday; |
28 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
29 | |
|
30 | |
import org.w3c.dom.Element; |
31 | |
|
32 | |
@XmlAccessorType(XmlAccessType.FIELD) |
33 | |
@XmlType(name = "HolidayInfo", propOrder = { |
34 | |
"id", "typeKey", "stateKey", "name", "descr", |
35 | |
"isInstructionalDay", "isAllDay", "isDateRange", |
36 | |
"startDate", "endDate", |
37 | |
"meta", "attributes", "_futureElements" }) |
38 | |
|
39 | |
public class HolidayInfo |
40 | |
extends IdEntityInfo |
41 | |
implements Holiday, Serializable { |
42 | |
|
43 | |
private static final long serialVersionUID = 1L; |
44 | |
|
45 | |
@XmlElement |
46 | |
private Boolean isInstructionalDay; |
47 | |
|
48 | |
@XmlElement |
49 | |
private Boolean isAllDay; |
50 | |
|
51 | |
@XmlElement |
52 | |
private Boolean isDateRange; |
53 | |
|
54 | |
@XmlElement |
55 | |
private Date startDate; |
56 | |
|
57 | |
@XmlElement |
58 | |
private Date endDate; |
59 | |
|
60 | |
@XmlAnyElement |
61 | |
private List<Element> _futureElements; |
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
|
67 | 0 | public HolidayInfo() { |
68 | 0 | } |
69 | |
|
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
public HolidayInfo(Holiday holiday) { |
76 | 0 | super(holiday); |
77 | 0 | if (holiday != null) { |
78 | 0 | this.isInstructionalDay = holiday.getIsInstructionalDay(); |
79 | 0 | this.isAllDay = holiday.getIsAllDay(); |
80 | 0 | this.isDateRange = holiday.getIsDateRange(); |
81 | |
|
82 | 0 | if (holiday.getStartDate() != null) { |
83 | 0 | this.startDate = new Date(holiday.getStartDate().getTime()); |
84 | |
} |
85 | |
|
86 | 0 | if (holiday.getEndDate() != null) { |
87 | 0 | this.endDate = new Date(holiday.getEndDate().getTime()); |
88 | |
} |
89 | |
} |
90 | 0 | } |
91 | |
|
92 | |
@Override |
93 | |
public Boolean getIsInstructionalDay() { |
94 | 0 | return isInstructionalDay; |
95 | |
} |
96 | |
|
97 | |
public void setIsInstructionalDay(Boolean isInstructionalDay) { |
98 | 0 | this.isInstructionalDay = isInstructionalDay; |
99 | 0 | } |
100 | |
|
101 | |
@Override |
102 | |
public Boolean getIsAllDay() { |
103 | 0 | return isAllDay; |
104 | |
} |
105 | |
|
106 | |
public void setIsAllDay(Boolean isAllDay) { |
107 | 0 | this.isAllDay = isAllDay; |
108 | 0 | } |
109 | |
|
110 | |
@Override |
111 | |
public Boolean getIsDateRange() { |
112 | 0 | return isDateRange; |
113 | |
} |
114 | |
|
115 | |
public void setIsDateRange(Boolean isDateRange) { |
116 | 0 | this.isDateRange = isDateRange; |
117 | 0 | } |
118 | |
|
119 | |
@Override |
120 | |
public Date getStartDate() { |
121 | 0 | return startDate; |
122 | |
} |
123 | |
|
124 | |
public void setStartDate(Date startDate) { |
125 | 0 | this.startDate = startDate; |
126 | 0 | } |
127 | |
|
128 | |
@Override |
129 | |
public Date getEndDate() { |
130 | 0 | return endDate; |
131 | |
} |
132 | |
|
133 | |
public void setEndDate(Date endDate) { |
134 | 0 | this.endDate = endDate; |
135 | 0 | } |
136 | |
} |