| 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.CampusCalendar; |
| 28 | |
import org.kuali.student.r2.common.dto.KeyEntityInfo; |
| 29 | |
import org.kuali.student.r2.common.infc.Attribute; |
| 30 | |
import org.kuali.student.r2.common.infc.Meta; |
| 31 | |
import org.kuali.student.r2.common.infc.RichText; |
| 32 | |
import org.w3c.dom.Element; |
| 33 | |
|
| 34 | |
@XmlAccessorType(XmlAccessType.FIELD) |
| 35 | |
@XmlType(name = "CampusCalendarInfo", propOrder = { "key", "typeKey", |
| 36 | |
"stateKey", "name", "descr", "startDate", "endDate", "location", |
| 37 | |
"meta", "attributes", "_futureElements" }) |
| 38 | |
public class CampusCalendarInfo extends KeyEntityInfo implements |
| 39 | |
CampusCalendar, Serializable { |
| 40 | |
|
| 41 | |
private static final long serialVersionUID = 1L; |
| 42 | |
@XmlElement |
| 43 | |
private String location; |
| 44 | |
@XmlElement |
| 45 | |
private Date startDate; |
| 46 | |
@XmlElement |
| 47 | |
private Date endDate; |
| 48 | |
@XmlAnyElement |
| 49 | |
private List<Element> _futureElements; |
| 50 | |
|
| 51 | |
public static CampusCalendarInfo newInstance() { |
| 52 | 0 | return new CampusCalendarInfo(); |
| 53 | |
} |
| 54 | |
|
| 55 | 0 | public CampusCalendarInfo() { |
| 56 | 0 | location = null; |
| 57 | 0 | _futureElements = null; |
| 58 | 0 | setStartDate(null); |
| 59 | 0 | setEndDate(null); |
| 60 | 0 | } |
| 61 | |
|
| 62 | |
|
| 63 | |
|
| 64 | |
|
| 65 | |
|
| 66 | |
|
| 67 | |
|
| 68 | |
public CampusCalendarInfo(CampusCalendar campusCalendar) { |
| 69 | 0 | super(campusCalendar); |
| 70 | 0 | if (null != campusCalendar) { |
| 71 | 0 | this.location = campusCalendar.getLocation(); |
| 72 | 0 | this.startDate = new Date (campusCalendar.getStartDate().getTime()); |
| 73 | 0 | this.endDate = new Date(campusCalendar.getEndDate().getTime()); |
| 74 | 0 | _futureElements = null; |
| 75 | |
} |
| 76 | 0 | } |
| 77 | |
|
| 78 | |
@Override |
| 79 | |
public String getLocation() { |
| 80 | 0 | return location; |
| 81 | |
} |
| 82 | |
|
| 83 | |
public void setLocation(String location) { |
| 84 | 0 | this.location = location; |
| 85 | 0 | } |
| 86 | |
|
| 87 | |
@Override |
| 88 | |
public Date getStartDate() { |
| 89 | 0 | return startDate; |
| 90 | |
} |
| 91 | |
|
| 92 | |
public void setStartDate(Date startDate) { |
| 93 | 0 | this.startDate = startDate; |
| 94 | 0 | } |
| 95 | |
|
| 96 | |
@Override |
| 97 | |
public Date getEndDate() { |
| 98 | |
|
| 99 | 0 | return endDate; |
| 100 | |
} |
| 101 | |
|
| 102 | |
public void setEndDate(Date endDate) { |
| 103 | 0 | this.endDate = endDate; |
| 104 | 0 | } |
| 105 | |
} |