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 | 0 | 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 | 0 | this.name = name; |
76 | 0 | } |
77 | |
|
78 | |
|
79 | |
|
80 | |
|
81 | |
public String getName() { |
82 | 0 | return name; |
83 | |
} |
84 | |
|
85 | |
public LoRichText getDescr() { |
86 | 0 | return descr; |
87 | |
} |
88 | |
|
89 | |
public void setDesc(LoRichText descr) { |
90 | 0 | this.descr = descr; |
91 | 0 | } |
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
public void setLoRepository(LoRepository loRepository) { |
97 | 0 | this.loRepository = loRepository; |
98 | 0 | } |
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
public LoRepository getLoRepository() { |
104 | 0 | return loRepository; |
105 | |
} |
106 | |
|
107 | |
public LoCategoryType getLoCategoryType() { |
108 | 0 | return loCategoryType; |
109 | |
} |
110 | |
|
111 | |
public void setLoCategoryType(LoCategoryType loCategoryType) { |
112 | 0 | this.loCategoryType = loCategoryType; |
113 | 0 | } |
114 | |
|
115 | |
public void setState(String state) { |
116 | 0 | this.state = state; |
117 | 0 | } |
118 | |
|
119 | |
public String getState() { |
120 | 0 | return state; |
121 | |
} |
122 | |
|
123 | |
public Date getEffectiveDate() { |
124 | 0 | return effectiveDate; |
125 | |
} |
126 | |
|
127 | |
public void setEffectiveDate(Date effectiveDate) { |
128 | 0 | this.effectiveDate = effectiveDate; |
129 | 0 | } |
130 | |
|
131 | |
public Date getExpirationDate() { |
132 | 0 | return expirationDate; |
133 | |
} |
134 | |
|
135 | |
public void setExpirationDate(Date expirationDate) { |
136 | 0 | this.expirationDate = expirationDate; |
137 | 0 | } |
138 | |
|
139 | |
|
140 | |
|
141 | |
|
142 | |
@Override |
143 | |
public List<LoCategoryAttribute> getAttributes() { |
144 | 0 | return attributes; |
145 | |
} |
146 | |
|
147 | |
|
148 | |
|
149 | |
|
150 | |
@Override |
151 | |
public void setAttributes(List<LoCategoryAttribute> attributes) { |
152 | 0 | this.attributes = attributes; |
153 | 0 | } |
154 | |
} |