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