1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.r2.common.dto;
18
19 import java.io.Serializable;
20 import java.util.Date;
21 import java.util.List;
22
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
29 import org.kuali.student.r2.common.infc.DateRange;
30
31
32
33
34
35
36
37
38 @XmlAccessorType(XmlAccessType.FIELD)
39 @XmlType(name = "DateRangeInfo", propOrder = {
40 "startDate", "endDate" })
41
42 public class DateRangeInfo
43 implements DateRange, Serializable {
44
45 private static final long serialVersionUID = 1L;
46
47 @XmlElement
48 private Date startDate;
49
50 @XmlElement
51 private Date endDate;
52
53
54
55
56
57
58
59
60
61 public DateRangeInfo() {
62 }
63
64
65
66
67
68
69 public DateRangeInfo(DateRange dateRange) {
70 if (dateRange != null) {
71 if (dateRange.getStartDate() != null) {
72 this.startDate = new Date(dateRange.getStartDate().getTime());
73 }
74
75 if (dateRange.getEndDate() != null) {
76 this.endDate = new Date(dateRange.getEndDate().getTime());
77 }
78 }
79 }
80
81 @Override
82 public Date getStartDate() {
83 return startDate;
84 }
85
86 public void setStartDate(Date startDate) {
87 this.startDate = startDate;
88 }
89
90 @Override
91 public Date getEndDate() {
92 return endDate;
93 }
94
95 public void setEndDate(Date endDate) {
96 this.endDate = endDate;
97 }
98 }