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.ArrayList; |
19 | |
import java.util.Date; |
20 | |
import java.util.List; |
21 | |
|
22 | |
import javax.persistence.CascadeType; |
23 | |
import javax.persistence.Column; |
24 | |
import javax.persistence.Entity; |
25 | |
import javax.persistence.JoinColumn; |
26 | |
import javax.persistence.JoinTable; |
27 | |
import javax.persistence.ManyToMany; |
28 | |
import javax.persistence.ManyToOne; |
29 | |
import javax.persistence.NamedQueries; |
30 | |
import javax.persistence.NamedQuery; |
31 | |
import javax.persistence.OneToMany; |
32 | |
import javax.persistence.OneToOne; |
33 | |
import javax.persistence.Table; |
34 | |
import javax.persistence.Temporal; |
35 | |
import javax.persistence.TemporalType; |
36 | |
|
37 | |
import org.kuali.student.core.entity.AttributeOwner; |
38 | |
import org.kuali.student.core.entity.MetaEntity; |
39 | |
|
40 | |
@Entity |
41 | |
@Table(name = "KSLU_CLU_SET") |
42 | |
@NamedQueries( { |
43 | |
@NamedQuery(name = "CluSet.getCluSetInfoByIdList", query = "SELECT c FROM CluSet c WHERE c.id IN (:cluSetIdList)"), |
44 | |
@NamedQuery(name = "CluSet.isCluInCluSet", query = "SELECT COUNT(cluSet) FROM CluSet cluSet JOIN cluSet.cluVerIndIds cluVerIndIds WHERE cluSet.id = :cluSetId AND cluVerIndIds.cluVersionIndId = :cluId ") |
45 | |
}) |
46 | 219 | public class CluSet extends MetaEntity implements AttributeOwner<CluSetAttribute> { |
47 | |
|
48 | |
@Column(name = "NAME") |
49 | |
private String name; |
50 | |
|
51 | |
@ManyToOne(cascade=CascadeType.ALL) |
52 | |
@JoinColumn(name = "RT_DESCR_ID") |
53 | |
private LuRichText descr; |
54 | |
|
55 | |
@Temporal(TemporalType.TIMESTAMP) |
56 | |
@Column(name = "EFF_DT") |
57 | |
private Date effectiveDate; |
58 | |
|
59 | |
@Temporal(TemporalType.TIMESTAMP) |
60 | |
@Column(name = "EXPIR_DT") |
61 | |
private Date expirationDate; |
62 | |
|
63 | 219 | @ManyToMany |
64 | |
@JoinTable(name = "KSLU_CLU_SET_JN_CLU_SET", joinColumns = @JoinColumn(name = "CLU_SET_PARENT_ID"), inverseJoinColumns = @JoinColumn(name = "CLU_SET_CHILD_ID")) |
65 | |
private List<CluSet> cluSets = new ArrayList<CluSet>(); |
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | 219 | @OneToMany(mappedBy="cluSet",cascade=CascadeType.ALL) |
72 | |
private List<CluSetJoinVersionIndClu> cluVerIndIds = new ArrayList<CluSetJoinVersionIndClu>(); |
73 | |
|
74 | 219 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
75 | |
private List<CluSetAttribute> attributes = new ArrayList<CluSetAttribute>(); |
76 | |
|
77 | |
@Column(name="TYPE") |
78 | |
private String type; |
79 | |
|
80 | |
@Column(name = "ST") |
81 | |
private String state; |
82 | |
|
83 | |
@Column(name = "ADMIN_ORG_ID") |
84 | |
private String adminOrg; |
85 | |
|
86 | |
@OneToOne(cascade=CascadeType.ALL) |
87 | |
@JoinColumn(name="MEM_QUERY_ID") |
88 | |
private MembershipQuery membershipQuery; |
89 | |
|
90 | |
@Column(name = "REUSABLE") |
91 | |
private Boolean isReusable; |
92 | |
|
93 | |
@Column(name = "REFERENCEABLE") |
94 | |
private Boolean isReferenceable; |
95 | |
|
96 | |
|
97 | |
|
98 | |
|
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
|
104 | |
public String getName() { |
105 | 148 | return name; |
106 | |
} |
107 | |
|
108 | |
public void setName(String name) { |
109 | 45 | this.name = name; |
110 | 45 | } |
111 | |
|
112 | |
public LuRichText getDescr() { |
113 | 148 | return descr; |
114 | |
} |
115 | |
|
116 | |
public void setDescr(LuRichText descr) { |
117 | 45 | this.descr = descr; |
118 | 45 | } |
119 | |
|
120 | |
public Date getEffectiveDate() { |
121 | 148 | return effectiveDate; |
122 | |
} |
123 | |
|
124 | |
public void setEffectiveDate(Date effectiveDate) { |
125 | 45 | this.effectiveDate = effectiveDate; |
126 | 45 | } |
127 | |
|
128 | |
public Date getExpirationDate() { |
129 | 148 | return expirationDate; |
130 | |
} |
131 | |
|
132 | |
public void setExpirationDate(Date expirationDate) { |
133 | 45 | this.expirationDate = expirationDate; |
134 | 45 | } |
135 | |
|
136 | |
public List<CluSet> getCluSets() { |
137 | 714 | return cluSets; |
138 | |
} |
139 | |
|
140 | |
public void setCluSets(List<CluSet> cluSets) { |
141 | 12 | this.cluSets = cluSets; |
142 | 12 | } |
143 | |
|
144 | |
public List<CluSetAttribute> getAttributes() { |
145 | 283 | return attributes; |
146 | |
} |
147 | |
|
148 | |
public void setAttributes(List<CluSetAttribute> attributes) { |
149 | 45 | this.attributes = attributes; |
150 | 45 | } |
151 | |
|
152 | |
public String getType() { |
153 | 158 | return type; |
154 | |
} |
155 | |
|
156 | |
public void setType(String type) { |
157 | 81 | this.type = type; |
158 | 81 | } |
159 | |
|
160 | |
public String getState() { |
161 | 148 | return state; |
162 | |
} |
163 | |
|
164 | |
public void setState(String state) { |
165 | 45 | this.state = state; |
166 | 45 | } |
167 | |
|
168 | |
public String getAdminOrg() { |
169 | 148 | return adminOrg; |
170 | |
} |
171 | |
|
172 | |
public void setAdminOrg(String adminOrg) { |
173 | 45 | this.adminOrg = adminOrg; |
174 | 45 | } |
175 | |
|
176 | |
public MembershipQuery getMembershipQuery() { |
177 | 148 | return membershipQuery; |
178 | |
} |
179 | |
|
180 | |
public void setMembershipQuery(MembershipQuery membershipQuery) { |
181 | 45 | this.membershipQuery = membershipQuery; |
182 | 45 | } |
183 | |
|
184 | |
public Boolean getIsReusable() { |
185 | 296 | return isReusable; |
186 | |
} |
187 | |
|
188 | |
public void setIsReusable(Boolean isReusable) { |
189 | 45 | this.isReusable = isReusable; |
190 | 45 | } |
191 | |
|
192 | |
public Boolean getIsReferenceable() { |
193 | 296 | return isReferenceable; |
194 | |
} |
195 | |
|
196 | |
public void setIsReferenceable(Boolean isReferenceable) { |
197 | 45 | this.isReferenceable = isReferenceable; |
198 | 45 | } |
199 | |
|
200 | |
public List<CluSetJoinVersionIndClu> getCluVerIndIds() { |
201 | 363 | return cluVerIndIds; |
202 | |
} |
203 | |
|
204 | |
public void setCluVerIndIds(List<CluSetJoinVersionIndClu> cluVerIndIds) { |
205 | 0 | this.cluVerIndIds = cluVerIndIds; |
206 | 0 | } |
207 | |
|
208 | |
} |