1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.core.appointment.dto; |
17 | |
|
18 | |
|
19 | |
import org.kuali.student.r2.common.dto.IdNamelessEntityInfo; |
20 | |
import org.kuali.student.r2.core.appointment.infc.AppointmentSlot; |
21 | |
|
22 | |
import javax.xml.bind.Element; |
23 | |
import javax.xml.bind.annotation.XmlAccessType; |
24 | |
import javax.xml.bind.annotation.XmlAccessorType; |
25 | |
import javax.xml.bind.annotation.XmlAnyElement; |
26 | |
import javax.xml.bind.annotation.XmlElement; |
27 | |
import javax.xml.bind.annotation.XmlType; |
28 | |
import java.util.Date; |
29 | |
import java.util.List; |
30 | |
|
31 | |
@XmlAccessorType(XmlAccessType.FIELD) |
32 | |
@XmlType(name = "AppointmentSlotInfo", propOrder = {"id", "typeKey", "stateKey", |
33 | |
"startDate", "endDate", "appointmentWindowId", "meta", "attributes", "_futureElements"}) |
34 | |
public class AppointmentSlotInfo extends IdNamelessEntityInfo implements AppointmentSlot { |
35 | |
|
36 | |
@XmlElement |
37 | |
private Date startDate; |
38 | |
@XmlElement |
39 | |
private Date endDate; |
40 | |
@XmlElement |
41 | |
private String appointmentWindowId; |
42 | |
@XmlAnyElement |
43 | |
private List<Element> _futureElements; |
44 | |
|
45 | 0 | public AppointmentSlotInfo() { |
46 | |
|
47 | 0 | } |
48 | |
|
49 | |
public AppointmentSlotInfo(AppointmentSlot appointmentSlot) { |
50 | 0 | super(appointmentSlot); |
51 | 0 | if (null != appointmentSlot) { |
52 | 0 | this.startDate = (null != appointmentSlot.getStartDate()) ? new Date(appointmentSlot.getStartDate().getTime()) : null; |
53 | 0 | this.endDate = (null != appointmentSlot.getEndDate()) ? new Date(appointmentSlot.getEndDate().getTime()) : null; |
54 | 0 | this.appointmentWindowId = appointmentSlot.getAppointmentWindowId(); |
55 | |
} |
56 | 0 | } |
57 | |
|
58 | |
public void setStartDate(Date startDate) { |
59 | 0 | this.startDate = startDate; |
60 | 0 | } |
61 | |
|
62 | |
|
63 | |
@Override |
64 | |
public Date getStartDate() { |
65 | 0 | return this.startDate; |
66 | |
} |
67 | |
|
68 | |
public void setEndDate(Date endDate) { |
69 | 0 | this.endDate = endDate; |
70 | 0 | } |
71 | |
|
72 | |
@Override |
73 | |
public Date getEndDate() { |
74 | 0 | return this.endDate; |
75 | |
} |
76 | |
|
77 | |
public void setAppointmentWindowId(String appointmentWindowId) { |
78 | 0 | this.appointmentWindowId = appointmentWindowId; |
79 | 0 | } |
80 | |
|
81 | |
@Override |
82 | |
public String getAppointmentWindowId() { |
83 | 0 | return this.appointmentWindowId; |
84 | |
} |
85 | |
} |