1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.lum.lu.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 |
|
|
36 |
|
@Entity |
37 |
|
@Table(name = "KSLU_CLUCLU_RELTN") |
38 |
|
@NamedQueries({ |
39 |
|
@NamedQuery(name="CluCluRelation.getCluCluRelation", query="SELECT rel FROM CluCluRelation rel WHERE rel.clu.id = :cluId or rel.relatedClu.id = :cluId"), |
40 |
|
@NamedQuery(name="CluCluRelation.getRelatedCluIdsByCluId", query="SELECT rel.relatedClu.id FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.luLuRelationType.id = :luLuRelationTypeId"), |
41 |
|
@NamedQuery(name="CluCluRelation.getCluIdsByRelatedCluId", query = "SELECT rel.clu.id FROM CluCluRelation rel WHERE rel.relatedClu.id = :relatedCluId AND rel.luLuRelationType.id = :luLuRelationTypeId"), |
42 |
|
@NamedQuery(name="CluCluRelation.getRelationTypeByCluId", query="SELECT distinct rel.luLuRelationType.id FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.relatedClu.id = :relatedCluId"), |
43 |
|
@NamedQuery(name="CluCluRelation.getRelatedClusByCluId", query="SELECT rel.relatedClu FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.luLuRelationType.id = :luLuRelationTypeId"), |
44 |
|
@NamedQuery(name="CluCluRelation.getClusByRelatedCluId", query="SELECT rel.clu FROM CluCluRelation rel WHERE rel.relatedClu.id = :relatedCluId AND rel.luLuRelationType.id = :luLuRelationTypeId") |
45 |
|
}) |
|
|
| 0% |
Uncovered Elements: 32 (32) |
Complexity: 16 |
Complexity Density: 1 |
|
46 |
|
public class CluCluRelation extends MetaEntity implements |
47 |
|
AttributeOwner<CluCluRelationAttribute> { |
48 |
|
|
49 |
|
@ManyToOne |
50 |
|
@JoinColumn(name="CLU_ID") |
51 |
|
private Clu clu; |
52 |
|
|
53 |
|
@ManyToOne |
54 |
|
@JoinColumn(name="RELATED_CLU_ID") |
55 |
|
private Clu relatedClu; |
56 |
|
|
57 |
|
@ManyToOne |
58 |
|
@JoinColumn(name="LU_RELTN_TYPE_ID") |
59 |
|
private LuLuRelationType luLuRelationType; |
60 |
|
|
61 |
|
@Column(name = "CLU_RELTN_REQ") |
62 |
|
private boolean cluRelationRequired; |
63 |
|
|
64 |
|
@Temporal(TemporalType.TIMESTAMP) |
65 |
|
@Column(name = "EFF_DT") |
66 |
|
private Date effectiveDate; |
67 |
|
|
68 |
|
@Temporal(TemporalType.TIMESTAMP) |
69 |
|
@Column(name = "EXPIR_DT") |
70 |
|
private Date expirationDate; |
71 |
|
|
72 |
|
@Column(name = "ST") |
73 |
|
private String state; |
74 |
|
|
75 |
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
76 |
|
private List<CluCluRelationAttribute> attributes; |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0
|
public Clu getClu() {... |
79 |
0
|
return clu; |
80 |
|
} |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0
|
public void setClu(Clu clu) {... |
83 |
0
|
this.clu = clu; |
84 |
|
} |
85 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
86 |
0
|
public Clu getRelatedClu() {... |
87 |
0
|
return relatedClu; |
88 |
|
} |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
90 |
0
|
public void setRelatedClu(Clu relatedClu) {... |
91 |
0
|
this.relatedClu = relatedClu; |
92 |
|
} |
93 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
94 |
0
|
public LuLuRelationType getLuLuRelationType() {... |
95 |
0
|
return luLuRelationType; |
96 |
|
} |
97 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
98 |
0
|
public void setLuLuRelationType(LuLuRelationType luLuRelationType) {... |
99 |
0
|
this.luLuRelationType = luLuRelationType; |
100 |
|
} |
101 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
102 |
0
|
public boolean isCluRelationRequired() {... |
103 |
0
|
return cluRelationRequired; |
104 |
|
} |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
0
|
public void setCluRelationRequired(boolean cluRelationRequired) {... |
107 |
0
|
this.cluRelationRequired = cluRelationRequired; |
108 |
|
} |
109 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
110 |
0
|
public Date getEffectiveDate() {... |
111 |
0
|
return effectiveDate; |
112 |
|
} |
113 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
114 |
0
|
public void setEffectiveDate(Date effectiveDate) {... |
115 |
0
|
this.effectiveDate = effectiveDate; |
116 |
|
} |
117 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
118 |
0
|
public Date getExpirationDate() {... |
119 |
0
|
return expirationDate; |
120 |
|
} |
121 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
122 |
0
|
public void setExpirationDate(Date expirationDate) {... |
123 |
0
|
this.expirationDate = expirationDate; |
124 |
|
} |
125 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
126 |
0
|
public String getState() {... |
127 |
0
|
return state; |
128 |
|
} |
129 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
130 |
0
|
public void setState(String state) {... |
131 |
0
|
this.state = state; |
132 |
|
} |
133 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
134 |
0
|
@Override... |
135 |
|
public List<CluCluRelationAttribute> getAttributes() { |
136 |
0
|
return attributes; |
137 |
|
} |
138 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
139 |
0
|
@Override... |
140 |
|
public void setAttributes(List<CluCluRelationAttribute> attributes) { |
141 |
0
|
this.attributes = attributes; |
142 |
|
} |
143 |
|
} |