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.OneToOne; |
28 | |
import javax.persistence.Table; |
29 | |
import javax.persistence.Temporal; |
30 | |
import javax.persistence.TemporalType; |
31 | |
|
32 | |
import org.kuali.student.common.entity.AttributeOwner; |
33 | |
import org.kuali.student.common.entity.MetaEntity; |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
@Entity |
39 | |
@Table(name = "KSLO_LO_REPOSITORY") |
40 | 123 | public class LoRepository extends MetaEntity implements AttributeOwner<LoRepositoryAttribute> { |
41 | |
|
42 | |
@Column(name = "NAME") |
43 | |
private String name; |
44 | |
|
45 | |
@ManyToOne(cascade = CascadeType.ALL) |
46 | |
@JoinColumn(name = "RT_DESCR_ID") |
47 | |
private LoRichText descr; |
48 | |
|
49 | |
@OneToOne |
50 | |
@JoinColumn(name = "LO_ROOT_ID") |
51 | |
private Lo rootLo; |
52 | |
|
53 | |
@Temporal(TemporalType.TIMESTAMP) |
54 | |
@Column(name = "EFF_DT") |
55 | |
private Date effectiveDate; |
56 | |
|
57 | |
@Temporal(TemporalType.TIMESTAMP) |
58 | |
@Column(name = "EXPIR_DT") |
59 | |
private Date expirationDate; |
60 | |
|
61 | |
@OneToMany(cascade = CascadeType.ALL, mappedBy = "loRepository") |
62 | |
private List<LoCategory> categories; |
63 | |
|
64 | |
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
65 | |
private List<LoRepositoryAttribute> attributes; |
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
public void setDescr(LoRichText descr) { |
71 | 0 | this.descr = descr; |
72 | 0 | } |
73 | |
|
74 | |
|
75 | |
|
76 | |
|
77 | |
public LoRichText getDescr() { |
78 | 4 | return descr; |
79 | |
} |
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
public void setRootLo(Lo rootLo) { |
85 | 0 | this.rootLo = rootLo; |
86 | 0 | } |
87 | |
|
88 | |
|
89 | |
|
90 | |
|
91 | |
public Lo getRootLo() { |
92 | 4 | return rootLo; |
93 | |
} |
94 | |
|
95 | |
|
96 | |
|
97 | |
|
98 | |
public void setEffectiveDate(Date effectiveDate) { |
99 | 0 | this.effectiveDate = effectiveDate; |
100 | 0 | } |
101 | |
|
102 | |
|
103 | |
|
104 | |
|
105 | |
public Date getEffectiveDate() { |
106 | 4 | return effectiveDate; |
107 | |
} |
108 | |
|
109 | |
|
110 | |
|
111 | |
|
112 | |
public void setExpirationDate(Date expirationDate) { |
113 | 0 | this.expirationDate = expirationDate; |
114 | 0 | } |
115 | |
|
116 | |
|
117 | |
|
118 | |
|
119 | |
public Date getExpirationDate() { |
120 | 4 | return expirationDate; |
121 | |
} |
122 | |
|
123 | |
|
124 | |
|
125 | |
|
126 | |
public void setCategories(List<LoCategory> categories) { |
127 | 0 | this.categories = categories; |
128 | 0 | } |
129 | |
|
130 | |
|
131 | |
|
132 | |
|
133 | |
public List<LoCategory> getCategories() { |
134 | 0 | return categories; |
135 | |
} |
136 | |
|
137 | |
|
138 | |
|
139 | |
|
140 | |
@Override |
141 | |
public List<LoRepositoryAttribute> getAttributes() { |
142 | 4 | return attributes; |
143 | |
} |
144 | |
|
145 | |
|
146 | |
|
147 | |
|
148 | |
@Override |
149 | |
public void setAttributes(List<LoRepositoryAttribute> attributes) { |
150 | 0 | this.attributes = attributes; |
151 | 0 | } |
152 | |
|
153 | |
|
154 | |
|
155 | |
|
156 | |
public void setName(String name) { |
157 | 0 | this.name = name; |
158 | 0 | } |
159 | |
|
160 | |
|
161 | |
|
162 | |
|
163 | |
public String getName() { |
164 | 4 | return name; |
165 | |
} |
166 | |
} |