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_MLSTN")
34 @NamedQueries({
35 @NamedQuery(name = "Milestone.findMilestonesByAtp", query = "SELECT milestone FROM Milestone milestone WHERE milestone.atp.id = :atpId"),
36 @NamedQuery(name = "Milestone.findMilestonesByDates", query = "SELECT milestone FROM Milestone milestone WHERE milestone.milestoneDate >= :startDate AND milestone.milestoneDate <= :endDate"),
37 @NamedQuery(name = "Milestone.findMilestonesByDatesAndType", query = "SELECT milestone FROM Milestone milestone WHERE milestone.type.id = :milestoneTypeId AND milestone.milestoneDate >= :startDate AND milestone.milestoneDate <= :endDate") })
38 public class Milestone extends KsTypeStateBusinessObjectBase {
39 private static final long serialVersionUID = 423410094436352921L;
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 MilestoneType type;
51
52 @Temporal(TemporalType.TIMESTAMP)
53 @Column(name = "MLSTN_DT")
54 private Date milestoneDate;
55
56 private String descriptionId;
57
58 private AtpRichText description;
59
60 public Milestone() {
61 super();
62 }
63
64 public Atp getAtp() {
65 return atp;
66 }
67
68 public void setAtp(Atp atp) {
69 this.atp = atp;
70 }
71
72 public Date getMilestoneDate() {
73 return milestoneDate;
74 }
75
76 public void setMilestoneDate(Date milestoneDate) {
77 this.milestoneDate = milestoneDate;
78 }
79
80 public String getAtpId() {
81 return atpId;
82 }
83
84 public void setAtpId(String atpId) {
85 this.atpId = atpId;
86 }
87
88 public MilestoneType getType() {
89 return type;
90 }
91
92 public void setType(MilestoneType type) {
93 this.type = type;
94 }
95
96 public String getDescriptionId() {
97 return descriptionId;
98 }
99
100 public void setDescriptionId(String descriptionId) {
101 this.descriptionId = descriptionId;
102 }
103
104 public AtpRichText getDescription() {
105 return description;
106 }
107
108 public void setDescription(AtpRichText description) {
109 this.description = description;
110 }
111 }