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 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 @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 @OneToMany(mappedBy="cluSet",cascade=CascadeType.ALL)
72 private List<CluSetJoinVersionIndClu> cluVerIndIds = new ArrayList<CluSetJoinVersionIndClu>();
73
74 @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 return name;
106 }
107
108 public void setName(String name) {
109 this.name = name;
110 }
111
112 public LuRichText getDescr() {
113 return descr;
114 }
115
116 public void setDescr(LuRichText descr) {
117 this.descr = descr;
118 }
119
120 public Date getEffectiveDate() {
121 return effectiveDate;
122 }
123
124 public void setEffectiveDate(Date effectiveDate) {
125 this.effectiveDate = effectiveDate;
126 }
127
128 public Date getExpirationDate() {
129 return expirationDate;
130 }
131
132 public void setExpirationDate(Date expirationDate) {
133 this.expirationDate = expirationDate;
134 }
135
136 public List<CluSet> getCluSets() {
137 return cluSets;
138 }
139
140 public void setCluSets(List<CluSet> cluSets) {
141 this.cluSets = cluSets;
142 }
143
144 public List<CluSetAttribute> getAttributes() {
145 return attributes;
146 }
147
148 public void setAttributes(List<CluSetAttribute> attributes) {
149 this.attributes = attributes;
150 }
151
152 public String getType() {
153 return type;
154 }
155
156 public void setType(String type) {
157 this.type = type;
158 }
159
160 public String getState() {
161 return state;
162 }
163
164 public void setState(String state) {
165 this.state = state;
166 }
167
168 public String getAdminOrg() {
169 return adminOrg;
170 }
171
172 public void setAdminOrg(String adminOrg) {
173 this.adminOrg = adminOrg;
174 }
175
176 public MembershipQuery getMembershipQuery() {
177 return membershipQuery;
178 }
179
180 public void setMembershipQuery(MembershipQuery membershipQuery) {
181 this.membershipQuery = membershipQuery;
182 }
183
184 public Boolean getIsReusable() {
185 return isReusable;
186 }
187
188 public void setIsReusable(Boolean isReusable) {
189 this.isReusable = isReusable;
190 }
191
192 public Boolean getIsReferenceable() {
193 return isReferenceable;
194 }
195
196 public void setIsReferenceable(Boolean isReferenceable) {
197 this.isReferenceable = isReferenceable;
198 }
199
200 public List<CluSetJoinVersionIndClu> getCluVerIndIds() {
201 return cluVerIndIds;
202 }
203
204 public void setCluVerIndIds(List<CluSetJoinVersionIndClu> cluVerIndIds) {
205 this.cluVerIndIds = cluVerIndIds;
206 }
207
208 }