1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.kuali.mobility.events.entity;
16
17 import java.io.Serializable;
18 import java.util.ArrayList;
19 import java.util.Date;
20 import java.util.List;
21
22 import javax.xml.bind.annotation.XmlElement;
23 import javax.xml.bind.annotation.XmlRootElement;
24
25 @XmlRootElement(name = "event")
26 public class EventImpl implements Serializable, Event {
27
28 private static final long serialVersionUID = -2196031917411001051L;
29 private String eventId;
30 private boolean allDay;
31 private String title;
32 private Date startDate;
33 private Date endDate;
34 private String displayStartDate;
35 private String displayEndDate;
36 private String displayStartTime;
37 private String displayEndTime;
38 private String location;
39 private List<String> description;
40 private String link;
41 private List<EventContactImpl> contact;
42 private String cost;
43 private List<ArrayList<String>> otherInfo;
44 private CategoryImpl category;
45 private String type;
46
47
48
49
50
51 @XmlElement(name = "otherInfo")
52 @Override
53 public List<ArrayList<String>> getOtherInfo() {
54 return otherInfo;
55 }
56
57
58
59
60 @Override
61 public void setOtherInfo(List<? extends List<String>> otherInfo) {
62 this.otherInfo = (List<ArrayList<String>>) otherInfo;
63 }
64
65
66
67
68
69 @Override
70 public String getCost() {
71 return cost;
72 }
73
74
75
76
77 @Override
78 public void setCost(String cost) {
79 this.cost = cost;
80 }
81
82
83
84
85 @Override
86 public Date getEndDate() {
87 return endDate;
88 }
89
90
91
92
93 @Override
94 public void setEndDate(Date endDate) {
95 this.endDate = endDate;
96 }
97
98
99
100
101 @Override
102 public String getDisplayStartTime() {
103 return displayStartTime;
104 }
105
106
107
108
109 @Override
110 public void setDisplayStartTime(String displayStartTime) {
111 this.displayStartTime = displayStartTime;
112 }
113
114
115
116
117 @Override
118 public String getDisplayEndTime() {
119 return displayEndTime;
120 }
121
122
123
124
125 @Override
126 public void setDisplayEndTime(String displayEndTime) {
127 this.displayEndTime = displayEndTime;
128 }
129
130
131
132
133 @XmlElement(name = "description")
134 @Override
135 public List<String> getDescription() {
136 return description;
137 }
138
139
140
141
142 @Override
143 public void setDescription(List<String> description) {
144 this.description = description;
145 }
146
147
148
149
150 @Override
151 public String getDisplayEndDate() {
152 return displayEndDate;
153 }
154
155
156
157
158 @Override
159 public void setDisplayEndDate(String displayEndDate) {
160 this.displayEndDate = displayEndDate;
161 }
162
163
164
165
166 @Override
167 public String getLocation() {
168 return location;
169 }
170
171
172
173
174 @Override
175 public void setLocation(String location) {
176 this.location = location;
177 }
178
179
180
181
182 @Override
183 public String getLink() {
184 return link;
185 }
186
187
188
189
190 @Override
191 public void setLink(String link) {
192 this.link = link;
193 }
194
195
196
197
198 @Override
199 public String getDisplayStartDate() {
200 return displayStartDate;
201 }
202
203
204
205
206 @Override
207 public void setDisplayStartDate(String displayStartDate) {
208 this.displayStartDate = displayStartDate;
209 }
210
211
212
213
214 @Override
215 public boolean isAllDay() {
216 return allDay;
217 }
218
219
220
221
222 @Override
223 public void setAllDay(boolean allDay) {
224 this.allDay = allDay;
225 }
226
227
228
229
230 @Override
231 public String getEventId() {
232 return eventId;
233 }
234
235
236
237
238 @Override
239 public void setEventId(String eventId) {
240 this.eventId = eventId;
241 }
242
243
244
245
246 @Override
247 public String getTitle() {
248 return title;
249 }
250
251
252
253
254 @Override
255 public void setTitle(String title) {
256 this.title = title;
257 }
258
259
260
261
262 @Override
263 public Date getStartDate() {
264 return startDate;
265 }
266
267
268
269
270 @Override
271 public void setStartDate(Date startDate) {
272 this.startDate = startDate;
273 }
274
275
276
277
278 @Override
279 public void setCategory(Category category) {
280 this.category = (CategoryImpl)category;
281 }
282
283
284
285
286 @Override
287 public CategoryImpl getCategory() {
288 return category;
289 }
290
291
292
293
294 @Override
295 public boolean equals( Object o )
296 {
297 boolean isEqual = false;
298
299 if( o != null && o instanceof Event )
300 {
301 if( getEventId() != null && getEventId().equalsIgnoreCase( ((Event)o).getEventId() ) )
302 {
303 isEqual = true;
304 }
305 }
306
307 return isEqual;
308 }
309
310
311
312
313 @Override
314 public int hashCode()
315 {
316 return (41 + Integer.parseInt( getEventId().substring(5) ) );
317 }
318
319 @XmlElement(name = "contact")
320 public List<EventContactImpl> getContact() {
321 return contact;
322 }
323
324 public void setContact(List<? extends EventContact> contact) {
325 this.contact = (List<EventContactImpl>)(List<?>) contact;
326 }
327
328 @Override
329 public String getType() {
330 return type;
331 }
332
333 @Override
334 public void setType(String eType) {
335 this.type = eType;
336 }
337 }