1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
package org.kuali.student.enrollment.classII.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.classII.acal.infc.CampusCalendar; |
28 | |
import org.kuali.student.r2.common.dto.KeyEntityInfo; |
29 | |
import org.kuali.student.r2.common.infc.ModelBuilder; |
30 | |
import org.w3c.dom.Element; |
31 | |
|
32 | |
@XmlAccessorType(XmlAccessType.FIELD) |
33 | |
@XmlType(name = "CampusCalendarInfo", propOrder = {"key", "typeKey", "stateKey", "name", "descr", "startDate", "endDate", "location", "metaInfo", "attributes", "_futureElements"}) |
34 | |
public class CampusCalendarInfo extends KeyEntityInfo implements CampusCalendar, Serializable { |
35 | |
|
36 | |
private static final long serialVersionUID = 1L; |
37 | |
@XmlElement |
38 | |
private final Date startDate; |
39 | |
@XmlElement |
40 | |
private final Date endDate; |
41 | |
@XmlElement |
42 | |
private final String location; |
43 | |
@XmlAnyElement |
44 | |
private final List<Element> _futureElements; |
45 | |
|
46 | 0 | private CampusCalendarInfo() { |
47 | 0 | startDate = null; |
48 | 0 | endDate = null; |
49 | 0 | location = null; |
50 | 0 | _futureElements = null; |
51 | 0 | } |
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
public CampusCalendarInfo(CampusCalendar campusCalendar) { |
60 | 0 | super(campusCalendar); |
61 | 0 | this.startDate = null != campusCalendar.getStartDate() ? new Date(campusCalendar.getStartDate().getTime()) : null; |
62 | 0 | this.endDate = null != campusCalendar.getEndDate() ? new Date(campusCalendar.getEndDate().getTime()) : null; |
63 | 0 | this.location = campusCalendar.getLocation(); |
64 | 0 | _futureElements = null; |
65 | 0 | } |
66 | |
|
67 | |
@Override |
68 | |
public Date getStartDate() { |
69 | 0 | return startDate; |
70 | |
} |
71 | |
|
72 | |
@Override |
73 | |
public Date getEndDate() { |
74 | 0 | return endDate; |
75 | |
} |
76 | |
|
77 | |
@Override |
78 | |
public String getLocation() { |
79 | 0 | return location; |
80 | |
} |
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | 0 | public static class Builder extends KeyEntityInfo.Builder implements ModelBuilder<CampusCalendarInfo>, CampusCalendar { |
86 | |
|
87 | |
private Date startDate; |
88 | |
private Date endDate; |
89 | |
private String location; |
90 | |
|
91 | |
|
92 | |
|
93 | |
|
94 | 0 | public Builder() { |
95 | 0 | } |
96 | |
|
97 | |
|
98 | |
|
99 | |
|
100 | |
public Builder(CampusCalendar campusCalendar) { |
101 | 0 | super(campusCalendar); |
102 | 0 | this.startDate = campusCalendar.getStartDate(); |
103 | 0 | this.endDate = campusCalendar.getEndDate(); |
104 | 0 | this.location = campusCalendar.getLocation(); |
105 | 0 | } |
106 | |
|
107 | |
@Override |
108 | |
public CampusCalendarInfo build() { |
109 | 0 | return new CampusCalendarInfo(this); |
110 | |
} |
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 | |
|
130 | |
@Override |
131 | |
public String getLocation() { |
132 | 0 | return location; |
133 | |
} |
134 | |
|
135 | |
public void setLocation(String location) { |
136 | 0 | this.location = location; |
137 | 0 | } |
138 | |
} |
139 | |
} |