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.AttributeOverride; |
22 |
|
import javax.persistence.AttributeOverrides; |
23 |
|
import javax.persistence.CascadeType; |
24 |
|
import javax.persistence.Column; |
25 |
|
import javax.persistence.Entity; |
26 |
|
import javax.persistence.JoinColumn; |
27 |
|
import javax.persistence.ManyToOne; |
28 |
|
import javax.persistence.NamedQueries; |
29 |
|
import javax.persistence.NamedQuery; |
30 |
|
import javax.persistence.OneToMany; |
31 |
|
import javax.persistence.Table; |
32 |
|
import javax.persistence.Temporal; |
33 |
|
import javax.persistence.TemporalType; |
34 |
|
|
35 |
|
import org.kuali.student.core.entity.AttributeOwner; |
36 |
|
import org.kuali.student.core.entity.MetaEntity; |
37 |
|
|
38 |
|
@Entity |
39 |
|
@Table(name = "KSAP_DT_RANGE") |
40 |
|
@NamedQueries({ |
41 |
|
@NamedQuery(name="DateRange.findDateRangesByAtp", query="SELECT dateRange FROM DateRange dateRange WHERE dateRange.atp.id = :atpId"), |
42 |
|
@NamedQuery(name="DateRange.findDateRangesByDate", query="SELECT dateRange FROM DateRange dateRange WHERE dateRange.startDate <= :searchDate AND dateRange.endDate >= :searchDate") |
43 |
|
}) |
44 |
|
@AttributeOverrides({ |
45 |
|
@AttributeOverride(name="id", column=@Column(name="DATERANGE_KEY"))}) |
|
|
| 100% |
Uncovered Elements: 0 (32) |
Complexity: 16 |
Complexity Density: 1 |
|
46 |
|
public class DateRange extends MetaEntity implements AttributeOwner<DateRangeAttribute> { |
47 |
|
|
48 |
|
@Column(name = "NAME") |
49 |
|
private String name; |
50 |
|
|
51 |
|
@ManyToOne(cascade=CascadeType.ALL) |
52 |
|
@JoinColumn(name = "RT_DESCR_ID") |
53 |
|
private AtpRichText descr; |
54 |
|
|
55 |
|
@ManyToOne |
56 |
|
@JoinColumn(name = "ATP_ID") |
57 |
|
private Atp atp; |
58 |
|
|
59 |
|
@Temporal(TemporalType.TIMESTAMP) |
60 |
|
@Column(name="START_DT") |
61 |
|
private Date startDate; |
62 |
|
|
63 |
|
@Temporal(TemporalType.TIMESTAMP) |
64 |
|
@Column(name="END_DT") |
65 |
|
private Date endDate; |
66 |
|
|
67 |
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
68 |
|
private List<DateRangeAttribute> attributes; |
69 |
|
|
70 |
|
@ManyToOne |
71 |
|
@JoinColumn(name = "DT_RANGE_TYPE_ID") |
72 |
|
private DateRangeType type; |
73 |
|
|
74 |
|
@Column(name="STATE") |
75 |
|
private String state; |
76 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
77 |
4
|
public String getName() {... |
78 |
4
|
return name; |
79 |
|
} |
80 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
3
|
public void setName(String name) {... |
82 |
3
|
this.name = name; |
83 |
|
} |
84 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
4
|
public AtpRichText getDescr() {... |
86 |
4
|
return descr; |
87 |
|
} |
88 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
89 |
3
|
public void setDescr(AtpRichText descr) {... |
90 |
3
|
this.descr = descr; |
91 |
|
} |
92 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
4
|
public Atp getAtp() {... |
94 |
4
|
return atp; |
95 |
|
} |
96 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
3
|
public void setAtp(Atp atp) {... |
98 |
3
|
this.atp = atp; |
99 |
|
} |
100 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
101 |
4
|
public Date getStartDate() {... |
102 |
4
|
return startDate; |
103 |
|
} |
104 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
105 |
3
|
public void setStartDate(Date startDate) {... |
106 |
3
|
this.startDate = startDate; |
107 |
|
} |
108 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
109 |
4
|
public Date getEndDate() {... |
110 |
4
|
return endDate; |
111 |
|
} |
112 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
113 |
3
|
public void setEndDate(Date endDate) {... |
114 |
3
|
this.endDate = endDate; |
115 |
|
} |
116 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
117 |
10
|
public List<DateRangeAttribute> getAttributes() {... |
118 |
10
|
return attributes; |
119 |
|
} |
120 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
121 |
4
|
public void setAttributes(List<DateRangeAttribute> attributes) {... |
122 |
4
|
this.attributes = attributes; |
123 |
|
} |
124 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
125 |
4
|
public DateRangeType getType() {... |
126 |
4
|
return type; |
127 |
|
} |
128 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
129 |
3
|
public void setType(DateRangeType type) {... |
130 |
3
|
this.type = type; |
131 |
|
} |
132 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
133 |
4
|
public String getState() {... |
134 |
4
|
return state; |
135 |
|
} |
136 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
137 |
2
|
public void setState(String state) {... |
138 |
2
|
this.state = state; |
139 |
|
} |
140 |
|
|
141 |
|
} |