1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
package org.kuali.student.r2.core.atp.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.r2.core.atp.infc.Milestone; |
28 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
29 | |
import org.w3c.dom.Element; |
30 | |
|
31 | |
@XmlAccessorType(XmlAccessType.FIELD) |
32 | |
@XmlType(name = "MilestoneInfo", propOrder = { |
33 | |
"id", "typeKey", "stateKey", "name", "descr", |
34 | |
"isAllDay", "isInstructionalDay", |
35 | |
"isRelative", "relativeAnchorMilestoneId", |
36 | |
"isDateRange", "startDate", "endDate", |
37 | |
"meta", "attributes", "_futureElements" }) |
38 | |
|
39 | |
public class MilestoneInfo |
40 | |
extends IdEntityInfo |
41 | |
implements Milestone, Serializable { |
42 | |
|
43 | |
private static final long serialVersionUID = 1L; |
44 | |
|
45 | |
@XmlElement |
46 | |
private Boolean isAllDay; |
47 | |
|
48 | |
@XmlElement |
49 | |
private Boolean isInstructionalDay; |
50 | |
|
51 | |
@XmlElement |
52 | |
private Boolean isRelative; |
53 | |
|
54 | |
@XmlElement |
55 | |
private String relativeAnchorMilestoneId; |
56 | |
|
57 | |
@XmlElement |
58 | |
private Boolean isDateRange; |
59 | |
|
60 | |
@XmlElement |
61 | |
private Date startDate; |
62 | |
|
63 | |
@XmlElement |
64 | |
private Date endDate; |
65 | |
|
66 | |
@XmlAnyElement |
67 | |
private List<Element> _futureElements; |
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
|
73 | 0 | public MilestoneInfo() { |
74 | 0 | } |
75 | |
|
76 | |
|
77 | |
|
78 | |
|
79 | |
|
80 | |
|
81 | |
public MilestoneInfo(Milestone milestone) { |
82 | 0 | super(milestone); |
83 | |
|
84 | 0 | if (milestone != null) { |
85 | 0 | this.isAllDay = milestone.getIsAllDay(); |
86 | 0 | this.isInstructionalDay = milestone.getIsInstructionalDay(); |
87 | 0 | this.isRelative = milestone.getIsRelative(); |
88 | 0 | this.relativeAnchorMilestoneId = milestone.getRelativeAnchorMilestoneId(); |
89 | 0 | this.isDateRange = milestone.getIsDateRange(); |
90 | |
|
91 | 0 | if (milestone.getStartDate() != null) { |
92 | 0 | this.startDate = new Date(milestone.getStartDate().getTime()); |
93 | |
} |
94 | |
|
95 | 0 | if (milestone.getEndDate() != null) { |
96 | 0 | this.endDate = new Date(milestone.getEndDate().getTime()); |
97 | |
} |
98 | |
} |
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 getIsInstructionalDay() { |
112 | 0 | return isInstructionalDay; |
113 | |
} |
114 | |
|
115 | |
public void setIsInstructionalDay(Boolean isInstructionalDay) { |
116 | 0 | this.isInstructionalDay = isInstructionalDay; |
117 | 0 | } |
118 | |
|
119 | |
@Override |
120 | |
public Boolean getIsRelative() { |
121 | 0 | return isRelative; |
122 | |
} |
123 | |
|
124 | |
public void setIsRelative(Boolean isRelative) { |
125 | 0 | this.isRelative = isRelative; |
126 | 0 | } |
127 | |
|
128 | |
@Override |
129 | |
public String getRelativeAnchorMilestoneId() { |
130 | 0 | return relativeAnchorMilestoneId; |
131 | |
} |
132 | |
|
133 | |
public void setRelativeAnchorMilestoneId(String relativeAnchorMilestoneId) { |
134 | 0 | this.relativeAnchorMilestoneId = relativeAnchorMilestoneId; |
135 | 0 | } |
136 | |
|
137 | |
@Override |
138 | |
public Boolean getIsDateRange() { |
139 | 0 | return isDateRange; |
140 | |
} |
141 | |
|
142 | |
public void setIsDateRange(Boolean isDateRange) { |
143 | 0 | this.isDateRange = isDateRange; |
144 | 0 | } |
145 | |
|
146 | |
@Override |
147 | |
public Date getStartDate() { |
148 | 0 | return startDate; |
149 | |
} |
150 | |
|
151 | |
public void setStartDate(Date startDate) { |
152 | 0 | this.startDate = startDate; |
153 | 0 | } |
154 | |
|
155 | |
@Override |
156 | |
public Date getEndDate() { |
157 | 0 | return endDate; |
158 | |
} |
159 | |
|
160 | |
public void setEndDate(Date endDate) { |
161 | 0 | this.endDate = endDate; |
162 | 0 | } |
163 | |
} |