1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.r1.lum.lrc.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.OneToMany;
27 import javax.persistence.Table;
28 import javax.persistence.Temporal;
29 import javax.persistence.TemporalType;
30
31 import org.kuali.student.r1.common.entity.AttributeOwner;
32 import org.kuali.student.r1.common.entity.MetaEntity;
33 import org.kuali.student.r1.lum.lrc.entity.LrcRichText;
34 import org.kuali.student.r1.lum.lrc.entity.ScaleAttribute;
35
36 @Entity
37 @Table(name = "KSLR_SCALE")
38 public class Scale extends MetaEntity implements AttributeOwner<ScaleAttribute>{
39
40 @Column(name = "NAME")
41 private String name;
42
43 @ManyToOne(cascade = CascadeType.ALL)
44 @JoinColumn(name = "RT_DESCR_ID")
45 private LrcRichText descr;
46
47 @Temporal(TemporalType.TIMESTAMP)
48 @Column(name = "EFF_DT")
49 private Date effectiveDate;
50
51 @Temporal(TemporalType.TIMESTAMP)
52 @Column(name = "EXPIR_DT")
53 private Date expirationDate;
54
55 @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
56 private List<ScaleAttribute> attributes;
57
58
59
60
61 public String getName() {
62 return name;
63 }
64
65
66
67
68 public void setName(String name) {
69 this.name = name;
70 }
71
72
73
74
75 public LrcRichText getDesc() {
76 return descr;
77 }
78
79
80
81
82 public void setDesc(LrcRichText descr) {
83 this.descr = descr;
84 }
85
86
87
88
89 public Date getEffectiveDate() {
90 return effectiveDate;
91 }
92
93
94
95
96 public void setEffectiveDate(Date effectiveDate) {
97 this.effectiveDate = effectiveDate;
98 }
99
100
101
102
103 public Date getExpirationDate() {
104 return expirationDate;
105 }
106
107
108
109
110 public void setExpirationDate(Date expirationDate) {
111 this.expirationDate = expirationDate;
112 }
113
114 @Override
115 public List<ScaleAttribute> getAttributes() {
116 return attributes;
117 }
118
119 @Override
120 public void setAttributes(List<ScaleAttribute> attributes) {
121 this.attributes = attributes;
122 }
123
124 }