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 | 0 | super(); |
62 | 0 | } |
63 | |
|
64 | |
public Atp getAtp() { |
65 | 0 | return atp; |
66 | |
} |
67 | |
|
68 | |
public void setAtp(Atp atp) { |
69 | 0 | this.atp = atp; |
70 | 0 | } |
71 | |
|
72 | |
public Date getMilestoneDate() { |
73 | 0 | return milestoneDate; |
74 | |
} |
75 | |
|
76 | |
public void setMilestoneDate(Date milestoneDate) { |
77 | 0 | this.milestoneDate = milestoneDate; |
78 | 0 | } |
79 | |
|
80 | |
public String getAtpId() { |
81 | 0 | return atpId; |
82 | |
} |
83 | |
|
84 | |
public void setAtpId(String atpId) { |
85 | 0 | this.atpId = atpId; |
86 | 0 | } |
87 | |
|
88 | |
public MilestoneType getType() { |
89 | 0 | return type; |
90 | |
} |
91 | |
|
92 | |
public void setType(MilestoneType type) { |
93 | 0 | this.type = type; |
94 | 0 | } |
95 | |
|
96 | |
public String getDescriptionId() { |
97 | 0 | return descriptionId; |
98 | |
} |
99 | |
|
100 | |
public void setDescriptionId(String descriptionId) { |
101 | 0 | this.descriptionId = descriptionId; |
102 | 0 | } |
103 | |
|
104 | |
public AtpRichText getDescription() { |
105 | 0 | return description; |
106 | |
} |
107 | |
|
108 | |
public void setDescription(AtpRichText description) { |
109 | 0 | this.description = description; |
110 | 0 | } |
111 | |
} |