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.ArrayList; |
19 |
|
import java.util.Date; |
20 |
|
import java.util.List; |
21 |
|
|
22 |
|
import javax.persistence.CascadeType; |
23 |
|
import javax.persistence.Column; |
24 |
|
import javax.persistence.Entity; |
25 |
|
import javax.persistence.JoinColumn; |
26 |
|
import javax.persistence.ManyToOne; |
27 |
|
import javax.persistence.NamedQueries; |
28 |
|
import javax.persistence.NamedQuery; |
29 |
|
import javax.persistence.OneToMany; |
30 |
|
import javax.persistence.Table; |
31 |
|
import javax.persistence.Temporal; |
32 |
|
import javax.persistence.TemporalType; |
33 |
|
|
34 |
|
import org.kuali.student.core.bo.KsTypeStateBusinessObjectBase; |
35 |
|
|
36 |
|
@Entity |
37 |
|
@Table(name = "KSAP_ATP") |
38 |
|
@NamedQueries( { |
39 |
|
@NamedQuery(name = "Atp.findAtpsByAtpType", query = "SELECT atp FROM Atp atp WHERE atp.type.id = :atpTypeId"), |
40 |
|
@NamedQuery(name = "Atp.findAtpsByDate", query = "SELECT atp FROM Atp atp WHERE atp.effectiveDate <= :searchDate AND atp.expirationDate > :searchDate"), |
41 |
|
@NamedQuery(name = "Atp.findAtpsByDates", query = "SELECT atp FROM Atp atp WHERE atp.effectiveDate >= :startDate AND atp.expirationDate <= :endDate") |
42 |
|
}) |
|
|
| 0% |
Uncovered Elements: 32 (32) |
Complexity: 15 |
Complexity Density: 0.88 |
|
43 |
|
public class Atp extends KsTypeStateBusinessObjectBase { |
44 |
|
private static final long serialVersionUID = -4021959685737332345L; |
45 |
|
|
46 |
|
@ManyToOne |
47 |
|
@JoinColumn(name = "TYPE") |
48 |
|
private AtpType type; |
49 |
|
|
50 |
|
@Temporal(TemporalType.TIMESTAMP) |
51 |
|
@Column(name="START_DT") |
52 |
|
private Date startDate; |
53 |
|
|
54 |
|
@Temporal(TemporalType.TIMESTAMP) |
55 |
|
@Column(name="END_DT") |
56 |
|
private Date endDate; |
57 |
|
|
58 |
|
private String descriptionId; |
59 |
|
|
60 |
|
private AtpRichText description; |
61 |
|
|
62 |
|
@OneToMany(mappedBy = "atp", cascade = CascadeType.REMOVE) |
63 |
|
private List<DateRange> dateRanges; |
64 |
|
|
65 |
|
@OneToMany(mappedBy = "atp", cascade = CascadeType.REMOVE) |
66 |
|
private List<Milestone> milestones; |
67 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
68 |
0
|
public Atp() {... |
69 |
0
|
super(); |
70 |
0
|
dateRanges = new ArrayList<DateRange>(); |
71 |
0
|
milestones = new ArrayList<Milestone>(); |
72 |
|
|
73 |
|
} |
74 |
|
|
75 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
76 |
0
|
public AtpType getType() {... |
77 |
0
|
return type; |
78 |
|
} |
79 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
80 |
0
|
public void setType(AtpType type) {... |
81 |
0
|
this.type = type; |
82 |
|
} |
83 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
84 |
0
|
public Date getStartDate() {... |
85 |
0
|
return startDate; |
86 |
|
} |
87 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
88 |
0
|
public void setStartDate(Date startDate) {... |
89 |
0
|
this.startDate = startDate; |
90 |
|
} |
91 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
0
|
public Date getEndDate() {... |
93 |
0
|
return endDate; |
94 |
|
} |
95 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
96 |
0
|
public void setEndDate(Date endDate) {... |
97 |
0
|
this.endDate = endDate; |
98 |
|
} |
99 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
100 |
0
|
public String getDescriptionId() {... |
101 |
0
|
return descriptionId; |
102 |
|
} |
103 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
104 |
0
|
public void setDescriptionId(String descriptionId) {... |
105 |
0
|
this.descriptionId = descriptionId; |
106 |
|
} |
107 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
108 |
0
|
public AtpRichText getDescription() {... |
109 |
0
|
return description; |
110 |
|
} |
111 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
112 |
0
|
public void setDescription(AtpRichText description) {... |
113 |
0
|
this.description = description; |
114 |
|
} |
115 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
116 |
0
|
public List<DateRange> getDateRanges() {... |
117 |
0
|
return dateRanges; |
118 |
|
} |
119 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
120 |
0
|
public void setDateRanges(List<DateRange> dateRanges) {... |
121 |
0
|
this.dateRanges = dateRanges; |
122 |
|
} |
123 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
124 |
0
|
public List<Milestone> getMilestones() {... |
125 |
0
|
return milestones; |
126 |
|
} |
127 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
128 |
0
|
public void setMilestones(List<Milestone> milestones) {... |
129 |
0
|
this.milestones = milestones; |
130 |
|
} |
131 |
|
|
132 |
|
} |