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 |
|
}) |
|
|
| 100% |
Uncovered Elements: 0 (32) |
Complexity: 16 |
Complexity Density: 1 |
|
45 |
|
public class CluCluRelation extends MetaEntity implements |
46 |
|
AttributeOwner<CluCluRelationAttribute> { |
47 |
|
|
48 |
|
@ManyToOne |
49 |
|
@JoinColumn(name="CLU_ID") |
50 |
|
private Clu clu; |
51 |
|
|
52 |
|
@ManyToOne |
53 |
|
@JoinColumn(name="RELATED_CLU_ID") |
54 |
|
private Clu relatedClu; |
55 |
|
|
56 |
|
@ManyToOne |
57 |
|
@JoinColumn(name="LU_RELTN_TYPE_ID") |
58 |
|
private LuLuRelationType luLuRelationType; |
59 |
|
|
60 |
|
@Column(name = "CLU_RELTN_REQ") |
61 |
|
private boolean cluRelationRequired; |
62 |
|
|
63 |
|
@Temporal(TemporalType.TIMESTAMP) |
64 |
|
@Column(name = "EFF_DT") |
65 |
|
private Date effectiveDate; |
66 |
|
|
67 |
|
@Temporal(TemporalType.TIMESTAMP) |
68 |
|
@Column(name = "EXPIR_DT") |
69 |
|
private Date expirationDate; |
70 |
|
|
71 |
|
@Column(name = "ST") |
72 |
|
private String state; |
73 |
|
|
74 |
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
75 |
|
private List<CluCluRelationAttribute> attributes; |
76 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
77 |
391
|
public Clu getClu() {... |
78 |
391
|
return clu; |
79 |
|
} |
80 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
184
|
public void setClu(Clu clu) {... |
82 |
184
|
this.clu = clu; |
83 |
|
} |
84 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
391
|
public Clu getRelatedClu() {... |
86 |
391
|
return relatedClu; |
87 |
|
} |
88 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
89 |
184
|
public void setRelatedClu(Clu relatedClu) {... |
90 |
184
|
this.relatedClu = relatedClu; |
91 |
|
} |
92 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
391
|
public LuLuRelationType getLuLuRelationType() {... |
94 |
391
|
return luLuRelationType; |
95 |
|
} |
96 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
184
|
public void setLuLuRelationType(LuLuRelationType luLuRelationType) {... |
98 |
184
|
this.luLuRelationType = luLuRelationType; |
99 |
|
} |
100 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
101 |
391
|
public boolean isCluRelationRequired() {... |
102 |
391
|
return cluRelationRequired; |
103 |
|
} |
104 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
105 |
184
|
public void setCluRelationRequired(boolean cluRelationRequired) {... |
106 |
184
|
this.cluRelationRequired = cluRelationRequired; |
107 |
|
} |
108 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
109 |
391
|
public Date getEffectiveDate() {... |
110 |
391
|
return effectiveDate; |
111 |
|
} |
112 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
113 |
184
|
public void setEffectiveDate(Date effectiveDate) {... |
114 |
184
|
this.effectiveDate = effectiveDate; |
115 |
|
} |
116 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
117 |
391
|
public Date getExpirationDate() {... |
118 |
391
|
return expirationDate; |
119 |
|
} |
120 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
121 |
184
|
public void setExpirationDate(Date expirationDate) {... |
122 |
184
|
this.expirationDate = expirationDate; |
123 |
|
} |
124 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
125 |
391
|
public String getState() {... |
126 |
391
|
return state; |
127 |
|
} |
128 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
129 |
184
|
public void setState(String state) {... |
130 |
184
|
this.state = state; |
131 |
|
} |
132 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
133 |
943
|
@Override... |
134 |
|
public List<CluCluRelationAttribute> getAttributes() { |
135 |
943
|
return attributes; |
136 |
|
} |
137 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
138 |
366
|
@Override... |
139 |
|
public void setAttributes(List<CluCluRelationAttribute> attributes) { |
140 |
366
|
this.attributes = attributes; |
141 |
|
} |
142 |
|
} |