1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.core.atp.entity; |
17 |
|
|
18 |
|
import java.util.Date; |
19 |
|
import java.util.List; |
20 |
|
|
21 |
|
import javax.persistence.CascadeType; |
22 |
|
import javax.persistence.Column; |
23 |
|
import javax.persistence.Entity; |
24 |
|
import javax.persistence.JoinColumn; |
25 |
|
import javax.persistence.ManyToOne; |
26 |
|
import javax.persistence.NamedQueries; |
27 |
|
import javax.persistence.NamedQuery; |
28 |
|
import javax.persistence.OneToMany; |
29 |
|
import javax.persistence.Table; |
30 |
|
import javax.persistence.Temporal; |
31 |
|
import javax.persistence.TemporalType; |
32 |
|
|
33 |
|
import org.kuali.student.common.entity.AttributeOwner; |
34 |
|
import org.kuali.student.common.entity.MetaEntity; |
35 |
|
@Entity |
36 |
|
@Table(name = "KSAP_MLSTN") |
37 |
|
@NamedQueries( { |
38 |
|
@NamedQuery(name = "Milestone.findMilestonesByAtp", query = "SELECT milestone FROM Milestone milestone WHERE milestone.atp.id = :atpId"), |
39 |
|
@NamedQuery(name = "Milestone.findMilestonesByDates", query = "SELECT milestone FROM Milestone milestone WHERE milestone.milestoneDate >= :startDate AND milestone.milestoneDate <= :endDate"), |
40 |
|
@NamedQuery(name = "Milestone.findMilestonesByDatesAndType", query = "SELECT milestone FROM Milestone milestone WHERE milestone.type.id = :milestoneTypeId AND milestone.milestoneDate >= :startDate AND milestone.milestoneDate <= :endDate") |
41 |
|
}) |
|
|
| 0% |
Uncovered Elements: 28 (28) |
Complexity: 14 |
Complexity Density: 1 |
|
42 |
|
public class Milestone extends MetaEntity implements |
43 |
|
AttributeOwner<MilestoneAttribute> { |
44 |
|
|
45 |
|
@Column(name = "NAME") |
46 |
|
private String name; |
47 |
|
|
48 |
|
@ManyToOne(cascade=CascadeType.ALL) |
49 |
|
@JoinColumn(name = "RT_DESCR_ID") |
50 |
|
private AtpRichText descr; |
51 |
|
|
52 |
|
@ManyToOne |
53 |
|
@JoinColumn(name = "ATP_ID") |
54 |
|
private Atp atp; |
55 |
|
|
56 |
|
@Temporal(TemporalType.TIMESTAMP) |
57 |
|
@Column(name="MLSTN_DT") |
58 |
|
private Date milestoneDate; |
59 |
|
|
60 |
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
61 |
|
private List<MilestoneAttribute> attributes; |
62 |
|
|
63 |
|
@ManyToOne |
64 |
|
@JoinColumn(name = "MLSTN_TYPE_ID") |
65 |
|
private MilestoneType type; |
66 |
|
|
67 |
|
@Column(name="STATE") |
68 |
|
private String state; |
69 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
0
|
public String getName() {... |
71 |
0
|
return name; |
72 |
|
} |
73 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
0
|
public void setName(String name) {... |
75 |
0
|
this.name = name; |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0
|
public Atp getAtp() {... |
79 |
0
|
return atp; |
80 |
|
} |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0
|
public void setAtp(Atp atp) {... |
83 |
0
|
this.atp = atp; |
84 |
|
} |
85 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
86 |
0
|
public Date getMilestoneDate() {... |
87 |
0
|
return milestoneDate; |
88 |
|
} |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
90 |
0
|
public void setMilestoneDate(Date milestoneDate) {... |
91 |
0
|
this.milestoneDate = milestoneDate; |
92 |
|
} |
93 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
94 |
0
|
public List<MilestoneAttribute> getAttributes() {... |
95 |
0
|
return attributes; |
96 |
|
} |
97 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
98 |
0
|
public void setAttributes(List<MilestoneAttribute> attributes) {... |
99 |
0
|
this.attributes = attributes; |
100 |
|
} |
101 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
102 |
0
|
public MilestoneType getType() {... |
103 |
0
|
return type; |
104 |
|
} |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
0
|
public void setType(MilestoneType type) {... |
107 |
0
|
this.type = type; |
108 |
|
} |
109 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
110 |
0
|
public String getState() {... |
111 |
0
|
return state; |
112 |
|
} |
113 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
114 |
0
|
public void setState(String state) {... |
115 |
0
|
this.state = state; |
116 |
|
} |
117 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
118 |
0
|
public void setDescr(AtpRichText descr) {... |
119 |
0
|
this.descr = descr; |
120 |
|
} |
121 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
122 |
0
|
public AtpRichText getDescr() {... |
123 |
0
|
return descr; |
124 |
|
} |
125 |
|
|
126 |
|
} |