1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.lum.lo.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.common.entity.AttributeOwner; |
32 | |
import org.kuali.student.common.entity.MetaEntity; |
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
@Entity |
38 | |
@Table(name = "KSLO_LO_CATEGORY") |
39 | 114 | public class LoCategory extends MetaEntity implements AttributeOwner<LoCategoryAttribute> { |
40 | |
|
41 | |
@Column(name = "NAME") |
42 | |
private |
43 | |
String name; |
44 | |
|
45 | |
@ManyToOne(cascade = CascadeType.ALL) |
46 | |
@JoinColumn(name = "RT_DESCR_ID") |
47 | |
private LoRichText descr; |
48 | |
|
49 | |
@ManyToOne |
50 | |
@JoinColumn(name = "LO_REPO_ID") |
51 | |
private LoRepository loRepository; |
52 | |
|
53 | |
@ManyToOne |
54 | |
@JoinColumn(name = "LO_CATEGORY_TYPE_ID") |
55 | |
private LoCategoryType loCategoryType; |
56 | |
|
57 | |
@Column(name="STATE") |
58 | |
private String state; |
59 | |
|
60 | |
@Temporal(TemporalType.TIMESTAMP) |
61 | |
@Column(name = "EFF_DT") |
62 | |
private Date effectiveDate; |
63 | |
|
64 | |
@Temporal(TemporalType.TIMESTAMP) |
65 | |
@Column(name = "EXPIR_DT") |
66 | |
private Date expirationDate; |
67 | |
|
68 | |
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
69 | |
private List<LoCategoryAttribute> attributes; |
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
public void setName(String name) { |
75 | 5 | this.name = name; |
76 | 5 | } |
77 | |
|
78 | |
|
79 | |
|
80 | |
|
81 | |
public String getName() { |
82 | 800 | return name; |
83 | |
} |
84 | |
|
85 | |
public LoRichText getDescr() { |
86 | 800 | return descr; |
87 | |
} |
88 | |
|
89 | |
public void setDesc(LoRichText descr) { |
90 | 5 | this.descr = descr; |
91 | 5 | } |
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
public void setLoRepository(LoRepository loRepository) { |
97 | 9 | this.loRepository = loRepository; |
98 | 9 | } |
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
public LoRepository getLoRepository() { |
104 | 2093 | return loRepository; |
105 | |
} |
106 | |
|
107 | |
public LoCategoryType getLoCategoryType() { |
108 | 801 | return loCategoryType; |
109 | |
} |
110 | |
|
111 | |
public void setLoCategoryType(LoCategoryType loCategoryType) { |
112 | 9 | this.loCategoryType = loCategoryType; |
113 | 9 | } |
114 | |
|
115 | |
public void setState(String state) { |
116 | 6 | this.state = state; |
117 | 6 | } |
118 | |
|
119 | |
public String getState() { |
120 | 801 | return state; |
121 | |
} |
122 | |
|
123 | |
public Date getEffectiveDate() { |
124 | 800 | return effectiveDate; |
125 | |
} |
126 | |
|
127 | |
public void setEffectiveDate(Date effectiveDate) { |
128 | 5 | this.effectiveDate = effectiveDate; |
129 | 5 | } |
130 | |
|
131 | |
public Date getExpirationDate() { |
132 | 800 | return expirationDate; |
133 | |
} |
134 | |
|
135 | |
public void setExpirationDate(Date expirationDate) { |
136 | 5 | this.expirationDate = expirationDate; |
137 | 5 | } |
138 | |
|
139 | |
|
140 | |
|
141 | |
|
142 | |
@Override |
143 | |
public List<LoCategoryAttribute> getAttributes() { |
144 | 815 | return attributes; |
145 | |
} |
146 | |
|
147 | |
|
148 | |
|
149 | |
|
150 | |
@Override |
151 | |
public void setAttributes(List<LoCategoryAttribute> attributes) { |
152 | 10 | this.attributes = attributes; |
153 | 10 | } |
154 | |
} |