1 package org.kuali.student.lum.lu.bo;
2
3 import java.sql.Timestamp;
4 import java.util.List;
5
6 import javax.persistence.CascadeType;
7 import javax.persistence.Column;
8 import javax.persistence.JoinColumn;
9 import javax.persistence.JoinTable;
10 import javax.persistence.ManyToOne;
11 import javax.persistence.OneToMany;
12 import javax.persistence.OneToOne;
13 import javax.persistence.Transient;
14
15 import org.kuali.rice.kns.bo.InactivateableFromTo;
16 import org.kuali.student.core.bo.KsVersionBusinessObjectBase;
17 import org.kuali.student.core.bo.util.InactivatableFromToHelper;
18
19 public class Clu extends KsVersionBusinessObjectBase implements InactivateableFromTo {
20
21 private static final long serialVersionUID = -403153977773213333L;
22
23 private String officialCluId;
24
25 @OneToOne(cascade=CascadeType.ALL)
26 @JoinColumn(name = "OFFIC_CLU_ID")
27 private CluIdentifier officialIdentifier;
28
29 @OneToMany(cascade=CascadeType.ALL)
30 @JoinTable(name = "KSLU_CLU_JN_CLU_IDENT", joinColumns = @JoinColumn(name = "CLU_ID"), inverseJoinColumns = @JoinColumn(name = "ALT_CLU_ID"))
31 private List<CluIdentifier> alternateIdentifiers;
32
33 @Column(name = "STDY_SUBJ_AREA")
34 private String studySubjectArea;
35
36 private String descriptionId;
37
38 @ManyToOne(cascade=CascadeType.ALL)
39 @JoinColumn(name = "RT_DESCR_ID")
40 private LuRichText description;
41
42 @OneToMany(cascade=CascadeType.ALL, mappedBy = "clu")
43 private List<CluCampusLocation> campusLocations;
44
45 @OneToMany(cascade=CascadeType.ALL)
46 @JoinTable(name = "KSLU_CLU_JN_ACCRED", joinColumns = @JoinColumn(name = "CLU_ID"), inverseJoinColumns = @JoinColumn(name = "CLU_ACCRED_ID"))
47 private List<CluAccreditation> accreditations;
48
49 private List<CluAdminOrg> adminOrgs;
50
51 private String primaryInstructorId;
52
53 @ManyToOne(cascade=CascadeType.ALL)
54 @JoinColumn(name="PRI_INSTR_ID")
55 private CluInstructor primaryInstructor;
56
57 @OneToMany(cascade=CascadeType.ALL)
58 @JoinTable(name = "KSLU_CLU_JN_CLU_INSTR", joinColumns = @JoinColumn(name = "CLU_ID"), inverseJoinColumns = @JoinColumn(name = "CLU_INSTR_ID"))
59 private List<CluInstructor> instructors;
60
61 @Column(name = "EXP_FIRST_ATP")
62 private String expectedFirstAtp;
63
64 @Column(name = "LAST_ATP")
65 private String lastAtp;
66
67 @Column(name = "LAST_ADMIT_ATP")
68 private String lastAdmitAtp;
69
70
71 private String intensityTypeId;
72
73
74 private Integer intensityQuantity;
75
76
77 private String atpDurationTypeId;
78
79
80 private Integer timeQuantity;
81
82 @Column(name = "CAN_CREATE_LUI")
83 private boolean canCreateLui;
84
85 @Column(name = "REF_URL")
86 private String referenceURL;
87
88 @OneToMany(cascade = CascadeType.ALL, mappedBy="clu")
89 private List<LuCode> luCodes;
90
91 @Column(name = "NEXT_REVIEW_PRD")
92 private String nextReviewPeriod;
93
94 @Column(name = "IS_ENRL")
95 private boolean enrollable;
96
97 @OneToMany(cascade=CascadeType.ALL, mappedBy="clu")
98 private List<CluAtpTypeKey> offeredAtpTypes;
99
100 @Column(name = "HAS_EARLY_DROP_DEDLN")
101 private boolean hasEarlyDropDeadline;
102
103 @Column(name = "DEF_ENRL_EST")
104 private int defaultEnrollmentEstimate;
105
106 @Column(name = "DEF_MAX_ENRL")
107 private int defaultMaximumEnrollment;
108
109 @Column(name = "IS_HAZR_DISBLD_STU")
110 private boolean hazardousForDisabledStudents;
111
112 private String feeId;
113
114 @OneToOne(cascade=CascadeType.ALL)
115 @JoinColumn(name = "FEE_ID")
116 private CluFee fee;
117
118 private String cluAccountingId;
119
120 @OneToOne(cascade=CascadeType.ALL)
121 @JoinColumn(name = "ACCT_ID")
122 private CluAccounting accounting;
123
124 @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
125 private List<CluAttribute> attributes;
126
127 private String typeId;
128
129 @ManyToOne
130 @JoinColumn(name = "LUTYPE_ID")
131 private LuType luType;
132
133 @Column(name = "ST")
134 private String state;
135
136 @Column(name = "EFF_DT")
137 protected Timestamp activeFromDate;
138
139 @Column(name = "EXPIR_DT")
140 protected Timestamp activeToDate;
141
142 @Transient
143 protected Timestamp activeAsOfDate;
144
145
146 private List<CluCluRelation> cluRelations;
147
148
149
150 public boolean isActive() {
151 return InactivatableFromToHelper.isActive(this);
152 }
153
154 public void setActive(boolean active) {
155
156 }
157
158 public CluAccounting getAccounting() {
159
160 if(accounting == null) {
161 accounting = new CluAccounting();
162 }
163 return accounting;
164 }
165
166 public void setAccounting(CluAccounting accounting) {
167 this.accounting = accounting;
168 }
169
170
171 public String getOfficialCluId() {
172 return officialCluId;
173 }
174
175 public void setOfficialCluId(String officialCluId) {
176 this.officialCluId = officialCluId;
177 }
178
179 public CluIdentifier getOfficialIdentifier() {
180 return officialIdentifier;
181 }
182
183 public void setOfficialIdentifier(CluIdentifier officialIdentifier) {
184 this.officialIdentifier = officialIdentifier;
185 }
186
187 public List<CluIdentifier> getAlternateIdentifiers() {
188 return alternateIdentifiers;
189 }
190
191 public void setAlternateIdentifiers(List<CluIdentifier> alternateIdentifiers) {
192 this.alternateIdentifiers = alternateIdentifiers;
193 }
194
195 public String getStudySubjectArea() {
196 return studySubjectArea;
197 }
198
199 public void setStudySubjectArea(String studySubjectArea) {
200 this.studySubjectArea = studySubjectArea;
201 }
202
203 public String getDescriptionId() {
204 return descriptionId;
205 }
206
207 public void setDescriptionId(String descriptionId) {
208 this.descriptionId = descriptionId;
209 }
210
211 public LuRichText getDescription() {
212 return description;
213 }
214
215 public void setDescription(LuRichText description) {
216 this.description = description;
217 }
218
219 public List<CluCampusLocation> getCampusLocations() {
220 return campusLocations;
221 }
222
223 public void setCampusLocations(List<CluCampusLocation> campusLocations) {
224 this.campusLocations = campusLocations;
225 }
226
227 public List<CluAccreditation> getAccreditations() {
228 return accreditations;
229 }
230
231 public void setAccreditations(List<CluAccreditation> accreditations) {
232 this.accreditations = accreditations;
233 }
234
235 public List<CluAdminOrg> getAdminOrgs() {
236 return adminOrgs;
237 }
238
239 public void setAdminOrgs(List<CluAdminOrg> adminOrgs) {
240 this.adminOrgs = adminOrgs;
241 }
242
243 public String getPrimaryInstructorId() {
244 return primaryInstructorId;
245 }
246
247 public void setPrimaryInstructorId(String primaryInstructorId) {
248 this.primaryInstructorId = primaryInstructorId;
249 }
250
251 public CluInstructor getPrimaryInstructor() {
252 return primaryInstructor;
253 }
254
255 public void setPrimaryInstructor(CluInstructor primaryInstructor) {
256 this.primaryInstructor = primaryInstructor;
257 }
258
259 public List<CluInstructor> getInstructors() {
260 return instructors;
261 }
262
263 public void setInstructors(List<CluInstructor> instructors) {
264 this.instructors = instructors;
265 }
266
267 public String getExpectedFirstAtp() {
268 return expectedFirstAtp;
269 }
270
271 public void setExpectedFirstAtp(String expectedFirstAtp) {
272 this.expectedFirstAtp = expectedFirstAtp;
273 }
274
275 public String getLastAtp() {
276 return lastAtp;
277 }
278
279 public void setLastAtp(String lastAtp) {
280 this.lastAtp = lastAtp;
281 }
282
283 public String getLastAdmitAtp() {
284 return lastAdmitAtp;
285 }
286
287 public void setLastAdmitAtp(String lastAdmitAtp) {
288 this.lastAdmitAtp = lastAdmitAtp;
289 }
290
291 public boolean isCanCreateLui() {
292 return canCreateLui;
293 }
294
295 public void setCanCreateLui(boolean canCreateLui) {
296 this.canCreateLui = canCreateLui;
297 }
298
299 public String getReferenceURL() {
300 return referenceURL;
301 }
302
303 public void setReferenceURL(String referenceURL) {
304 this.referenceURL = referenceURL;
305 }
306
307 public String getNextReviewPeriod() {
308 return nextReviewPeriod;
309 }
310
311 public void setNextReviewPeriod(String nextReviewPeriod) {
312 this.nextReviewPeriod = nextReviewPeriod;
313 }
314
315 public boolean isEnrollable() {
316 return enrollable;
317 }
318
319 public void setEnrollable(boolean enrollable) {
320 this.enrollable = enrollable;
321 }
322
323 public boolean isHasEarlyDropDeadline() {
324 return hasEarlyDropDeadline;
325 }
326
327 public void setHasEarlyDropDeadline(boolean hasEarlyDropDeadline) {
328 this.hasEarlyDropDeadline = hasEarlyDropDeadline;
329 }
330
331 public int getDefaultEnrollmentEstimate() {
332 return defaultEnrollmentEstimate;
333 }
334
335 public void setDefaultEnrollmentEstimate(int defaultEnrollmentEstimate) {
336 this.defaultEnrollmentEstimate = defaultEnrollmentEstimate;
337 }
338
339 public int getDefaultMaximumEnrollment() {
340 return defaultMaximumEnrollment;
341 }
342
343 public void setDefaultMaximumEnrollment(int defaultMaximumEnrollment) {
344 this.defaultMaximumEnrollment = defaultMaximumEnrollment;
345 }
346
347 public boolean isHazardousForDisabledStudents() {
348 return hazardousForDisabledStudents;
349 }
350
351 public void setHazardousForDisabledStudents(boolean hazardousForDisabledStudents) {
352 this.hazardousForDisabledStudents = hazardousForDisabledStudents;
353 }
354
355 public String getTypeId() {
356 return typeId;
357 }
358
359 public void setTypeId(String typeId) {
360 this.typeId = typeId;
361 }
362
363 public LuType getLuType() {
364 return luType;
365 }
366
367 public void setLuType(LuType luType) {
368 this.luType = luType;
369 }
370
371 public String getState() {
372 return state;
373 }
374
375 public void setState(String state) {
376 this.state = state;
377 }
378
379 public String getCluAccountingId() {
380 return cluAccountingId;
381 }
382
383 public void setCluAccountingId(String cluAccountingId) {
384 this.cluAccountingId = cluAccountingId;
385 }
386
387 public String getFeeId() {
388 return feeId;
389 }
390
391 public void setFeeId(String feeId) {
392 this.feeId = feeId;
393 }
394
395 public CluFee getFee() {
396 if(fee == null) {
397 fee = new CluFee();
398 }
399 return fee;
400 }
401
402 public void setFee(CluFee fee) {
403 this.fee = fee;
404 }
405
406 public String getIntensityTypeId() {
407 return intensityTypeId;
408 }
409
410 public void setIntensityTypeId(String intensityTypeId) {
411 this.intensityTypeId = intensityTypeId;
412 }
413
414 public Integer getIntensityQuantity() {
415 return intensityQuantity;
416 }
417
418 public void setIntensityQuantity(Integer intensityQuantity) {
419 this.intensityQuantity = intensityQuantity;
420 }
421
422 public String getAtpDurationTypeId() {
423 return atpDurationTypeId;
424 }
425
426 public void setAtpDurationTypeId(String atpDurationTypeId) {
427 this.atpDurationTypeId = atpDurationTypeId;
428 }
429
430 public Integer getTimeQuantity() {
431 return timeQuantity;
432 }
433
434 public void setTimeQuantity(Integer timeQuantity) {
435 this.timeQuantity = timeQuantity;
436 }
437
438 public List<LuCode> getLuCodes() {
439 return luCodes;
440 }
441
442 public void setLuCodes(List<LuCode> luCodes) {
443 this.luCodes = luCodes;
444 }
445
446 public List<CluAtpTypeKey> getOfferedAtpTypes() {
447 return offeredAtpTypes;
448 }
449
450 public void setOfferedAtpTypes(List<CluAtpTypeKey> offeredAtpTypes) {
451 this.offeredAtpTypes = offeredAtpTypes;
452 }
453
454 public List<CluCluRelation> getCluRelations() {
455 return cluRelations;
456 }
457
458 public void setCluRelations(List<CluCluRelation> cluRelations) {
459 this.cluRelations = cluRelations;
460 }
461
462 public Timestamp getActiveFromDate() {
463 return activeFromDate;
464 }
465
466 public void setActiveFromDate(Timestamp activeFromDate) {
467 this.activeFromDate = activeFromDate;
468 }
469
470 public Timestamp getActiveToDate() {
471 return activeToDate;
472 }
473
474 public void setActiveToDate(Timestamp activeToDate) {
475 this.activeToDate = activeToDate;
476 }
477
478 public Timestamp getActiveAsOfDate() {
479 return activeAsOfDate;
480 }
481
482 public void setActiveAsOfDate(Timestamp activeAsOfDate) {
483 this.activeAsOfDate = activeAsOfDate;
484 }
485
486 public List<CluAttribute> getAttributes() {
487 return attributes;
488 }
489
490 public void setAttributes(List<CluAttribute> attributes) {
491 this.attributes = attributes;
492 }
493
494 }