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_ATP") |
37 |
|
@NamedQueries( { |
38 |
|
@NamedQuery(name = "Atp.findAtpsByAtpType", query = "SELECT atp FROM Atp atp WHERE atp.type.id = :atpTypeId"), |
39 |
|
@NamedQuery(name = "Atp.findAtpsByDate", query = "SELECT atp FROM Atp atp WHERE atp.startDate <= :searchDate AND atp.endDate > :searchDate"), |
40 |
|
@NamedQuery(name = "Atp.findAtpsByDates", query = "SELECT atp FROM Atp atp WHERE atp.startDate >= :startDate AND atp.endDate <= :endDate") |
41 |
|
}) |
|
|
| 88.9% |
Uncovered Elements: 4 (36) |
Complexity: 18 |
Complexity Density: 1 |
|
42 |
|
public class Atp extends MetaEntity implements AttributeOwner<AtpAttribute> { |
43 |
|
|
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 |
|
@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 |
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
61 |
|
private List<AtpAttribute> attributes; |
62 |
|
|
63 |
|
@ManyToOne |
64 |
|
@JoinColumn(name = "TYPE") |
65 |
|
private AtpType type; |
66 |
|
|
67 |
|
@Column(name = "STATE") |
68 |
|
private String state; |
69 |
|
|
70 |
|
@OneToMany(mappedBy = "atp", cascade = CascadeType.REMOVE) |
71 |
|
private List<DateRange> dateRanges; |
72 |
|
|
73 |
|
@OneToMany(mappedBy = "atp", cascade = CascadeType.REMOVE) |
74 |
|
private List<Milestone> milestones; |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
76 |
6
|
public String getName() {... |
77 |
6
|
return name; |
78 |
|
} |
79 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
80 |
4
|
public void setName(String name) {... |
81 |
4
|
this.name = name; |
82 |
|
} |
83 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
84 |
6
|
public AtpRichText getDescr() {... |
85 |
6
|
return descr; |
86 |
|
} |
87 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
88 |
4
|
public void setDescr(AtpRichText descr) {... |
89 |
4
|
this.descr = descr; |
90 |
|
} |
91 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
6
|
public Date getStartDate() {... |
93 |
6
|
return startDate; |
94 |
|
} |
95 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
96 |
4
|
public void setStartDate(Date startDate) {... |
97 |
4
|
this.startDate = startDate; |
98 |
|
} |
99 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
100 |
6
|
public Date getEndDate() {... |
101 |
6
|
return endDate; |
102 |
|
} |
103 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
104 |
4
|
public void setEndDate(Date endDate) {... |
105 |
4
|
this.endDate = endDate; |
106 |
|
} |
107 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
108 |
12
|
public List<AtpAttribute> getAttributes() {... |
109 |
12
|
return attributes; |
110 |
|
} |
111 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
112 |
5
|
public void setAttributes(List<AtpAttribute> attributes) {... |
113 |
5
|
this.attributes = attributes; |
114 |
|
} |
115 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
116 |
6
|
public AtpType getType() {... |
117 |
6
|
return type; |
118 |
|
} |
119 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
120 |
4
|
public void setType(AtpType type) {... |
121 |
4
|
this.type = type; |
122 |
|
} |
123 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
124 |
6
|
public String getState() {... |
125 |
6
|
return state; |
126 |
|
} |
127 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
128 |
4
|
public void setState(String state) {... |
129 |
4
|
this.state = state; |
130 |
|
} |
131 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
132 |
0
|
public List<DateRange> getDateRanges() {... |
133 |
0
|
return dateRanges; |
134 |
|
} |
135 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
136 |
1
|
public void setDateRanges(List<DateRange> dateRanges) {... |
137 |
1
|
this.dateRanges = dateRanges; |
138 |
|
} |
139 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
140 |
0
|
public List<Milestone> getMilestones() {... |
141 |
0
|
return milestones; |
142 |
|
} |
143 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
144 |
1
|
public void setMilestones(List<Milestone> milestones) {... |
145 |
1
|
this.milestones = milestones; |
146 |
|
} |
147 |
|
|
148 |
|
} |