1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.core.atp.bo;
17
18 import java.util.Date;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.JoinColumn;
23 import javax.persistence.ManyToOne;
24 import javax.persistence.NamedQueries;
25 import javax.persistence.NamedQuery;
26 import javax.persistence.Table;
27 import javax.persistence.Temporal;
28 import javax.persistence.TemporalType;
29
30 import org.kuali.student.core.bo.KsTypeStateBusinessObjectBase;
31
32 @Entity
33 @Table(name = "KSAP_DT_RANGE")
34 @NamedQueries({
35 @NamedQuery(name="DateRange.findDateRangesByAtp", query="SELECT dateRange FROM DateRange dateRange WHERE dateRange.atp.id = :atpId"),
36 @NamedQuery(name="DateRange.findDateRangesByDate", query="SELECT dateRange FROM DateRange dateRange WHERE dateRange.startDate <= :searchDate AND dateRange.endDate >= :searchDate")
37 })
38 public class DateRange extends KsTypeStateBusinessObjectBase {
39 private static final long serialVersionUID = -9071561165465644092L;
40
41 @Column(name = "ATP_ID")
42 private String atpId;
43
44 @ManyToOne
45 @JoinColumn(name = "ATP_ID")
46 private Atp atp;
47
48 @ManyToOne
49 @JoinColumn(name = "TYPE")
50 private DateRangeType type;
51
52 @Temporal(TemporalType.TIMESTAMP)
53 @Column(name="START_DT")
54 private Date startDate;
55
56 @Temporal(TemporalType.TIMESTAMP)
57 @Column(name="END_DT")
58 private Date endDate;
59
60 private String descriptionId;
61
62 private AtpRichText description;
63
64 public DateRange() {
65 super();
66 }
67
68 public Atp getAtp() {
69 return atp;
70 }
71
72 public Date getStartDate() {
73 return startDate;
74 }
75
76 public void setStartDate(Date startDate) {
77 this.startDate = startDate;
78 }
79
80 public Date getEndDate() {
81 return endDate;
82 }
83
84 public void setEndDate(Date endDate) {
85 this.endDate = endDate;
86 }
87
88 public String getAtpId() {
89 return atpId;
90 }
91
92 public void setAtpId(String atpId) {
93 this.atpId = atpId;
94 }
95
96 public void setAtp(Atp atp) {
97 this.atp = atp;
98 }
99
100 public DateRangeType getType() {
101 return type;
102 }
103
104 public void setType(DateRangeType type) {
105 this.type = type;
106 }
107
108 public String getDescriptionId() {
109 return descriptionId;
110 }
111
112 public void setDescriptionId(String descriptionId) {
113 this.descriptionId = descriptionId;
114 }
115
116 public AtpRichText getDescription() {
117 return description;
118 }
119
120 public void setDescription(AtpRichText description) {
121 this.description = description;
122 }
123
124 }