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.core.entity.AttributeOwner; |
34 |
|
import org.kuali.student.core.entity.MetaEntity; |
35 |
|
|
36 |
|
@Entity |
37 |
|
@Table(name = "KSLU_LUILUI_RELTN") |
38 |
|
@NamedQueries( { |
39 |
|
@NamedQuery(name = "LuiLuiRelation.getLuiLuiRelationsByLuiId", query = "SELECT llr FROM LuiLuiRelation llr WHERE llr.lui.id = :luiId"), |
40 |
|
@NamedQuery(name = "LuiLuiRelation.getLuiIdsByRelationType", query = "SELECT rel.lui.id FROM LuiLuiRelation rel WHERE rel.relatedLui.id = :luiId AND rel.luLuRelationType.id = :luLuRelationTypeId"), |
41 |
|
@NamedQuery(name = "LuiLuiRelation.getLuisByRelationType", query = "SELECT rel.lui FROM LuiLuiRelation rel WHERE rel.relatedLui.id = :luiId AND rel.luLuRelationType.id = :luLuRelationTypeId"), |
42 |
|
@NamedQuery(name = "LuiLuiRelation.getRelatedLuiIdsByLuiId", query = "SELECT rel.relatedLui.id FROM LuiLuiRelation rel WHERE rel.lui.id = :luiId AND rel.luLuRelationType.id = :luLuRelationTypeId"), |
43 |
|
@NamedQuery(name = "LuiLuiRelation.getRelationTypeByLuiId", query = "SELECT distinct rel.luLuRelationType.id FROM LuiLuiRelation rel WHERE rel.lui.id = :luiId AND rel.relatedLui.id = :relatedLuiId"), |
44 |
|
@NamedQuery(name = "LuiLuiRelation.getRelatedLuisByLuiId", query = "SELECT rel.relatedLui FROM LuiLuiRelation rel WHERE rel.lui.id = :luiId AND rel.luLuRelationType.id = :luLuRelationTypeId") |
45 |
|
}) |
|
|
| 100% |
Uncovered Elements: 0 (28) |
Complexity: 14 |
Complexity Density: 1 |
|
46 |
|
public class LuiLuiRelation extends MetaEntity implements |
47 |
|
AttributeOwner<LuiLuiRelationAttribute> { |
48 |
|
|
49 |
|
@ManyToOne |
50 |
|
@JoinColumn(name = "LUI_ID") |
51 |
|
private Lui lui; |
52 |
|
|
53 |
|
@ManyToOne |
54 |
|
@JoinColumn(name = "RELATED_LUI_ID") |
55 |
|
private Lui relatedLui; |
56 |
|
|
57 |
|
@ManyToOne |
58 |
|
@JoinColumn(name = "LULU_RELTN_TYPE_ID") |
59 |
|
private LuLuRelationType luLuRelationType; |
60 |
|
|
61 |
|
@Temporal(TemporalType.TIMESTAMP) |
62 |
|
@Column(name = "EFF_DT") |
63 |
|
private Date effectiveDate; |
64 |
|
|
65 |
|
@Temporal(TemporalType.TIMESTAMP) |
66 |
|
@Column(name = "EXPIR_DT") |
67 |
|
private Date expirationDate; |
68 |
|
|
69 |
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
70 |
|
private List<LuiLuiRelationAttribute> attributes; |
71 |
|
|
72 |
|
@Column(name = "ST") |
73 |
|
private String state; |
74 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
75 |
7
|
public Lui getLui() {... |
76 |
7
|
return lui; |
77 |
|
} |
78 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
79 |
2
|
public void setLui(Lui lui) {... |
80 |
2
|
this.lui = lui; |
81 |
|
} |
82 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
83 |
7
|
public Lui getRelatedLui() {... |
84 |
7
|
return relatedLui; |
85 |
|
} |
86 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
2
|
public void setRelatedLui(Lui relatedLui) {... |
88 |
2
|
this.relatedLui = relatedLui; |
89 |
|
} |
90 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
91 |
7
|
public LuLuRelationType getLuLuRelationType() {... |
92 |
7
|
return luLuRelationType; |
93 |
|
} |
94 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
2
|
public void setLuLuRelationType(LuLuRelationType luLuRelationType) {... |
96 |
2
|
this.luLuRelationType = luLuRelationType; |
97 |
|
} |
98 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
6
|
public Date getEffectiveDate() {... |
100 |
6
|
return effectiveDate; |
101 |
|
} |
102 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
2
|
public void setEffectiveDate(Date effectiveDate) {... |
104 |
2
|
this.effectiveDate = effectiveDate; |
105 |
|
} |
106 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
107 |
6
|
public Date getExpirationDate() {... |
108 |
6
|
return expirationDate; |
109 |
|
} |
110 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
111 |
2
|
public void setExpirationDate(Date expirationDate) {... |
112 |
2
|
this.expirationDate = expirationDate; |
113 |
|
} |
114 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
115 |
12
|
public List<LuiLuiRelationAttribute> getAttributes() {... |
116 |
12
|
return attributes; |
117 |
|
} |
118 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
119 |
3
|
public void setAttributes(List<LuiLuiRelationAttribute> attributes) {... |
120 |
3
|
this.attributes = attributes; |
121 |
|
} |
122 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
123 |
6
|
public String getState() {... |
124 |
6
|
return state; |
125 |
|
} |
126 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
127 |
2
|
public void setState(String state) {... |
128 |
2
|
this.state = state; |
129 |
|
} |
130 |
|
} |