1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.bo.impl; |
17 | |
|
18 | |
import java.util.LinkedHashMap; |
19 | |
|
20 | |
import javax.persistence.Column; |
21 | |
import javax.persistence.Entity; |
22 | |
import javax.persistence.Id; |
23 | |
import javax.persistence.PrePersist; |
24 | |
import javax.persistence.PreUpdate; |
25 | |
import javax.persistence.Table; |
26 | |
|
27 | |
import org.apache.ojb.broker.PersistenceBroker; |
28 | |
import org.apache.ojb.broker.PersistenceBrokerException; |
29 | |
import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO; |
30 | |
import org.kuali.rice.kim.bo.role.KimResponsibility; |
31 | |
import org.kuali.rice.kim.bo.types.dto.AttributeSet; |
32 | |
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; |
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
@Entity |
41 | |
@Table(name="KRIM_RSP_T") |
42 | |
public class ReviewResponsibility extends PersistableBusinessObjectBase { |
43 | |
|
44 | |
private static final long serialVersionUID = 1L; |
45 | |
|
46 | |
public static final String ACTION_DETAILS_AT_ROLE_MEMBER_LEVEL_FIELD_NAME = "actionDetailsAtRoleMemberLevel"; |
47 | |
|
48 | |
@Id |
49 | |
@Column(name="RSP_ID") |
50 | |
protected String responsibilityId; |
51 | |
protected String namespaceCode; |
52 | |
protected String name; |
53 | |
protected String description; |
54 | |
protected boolean active; |
55 | |
|
56 | |
|
57 | |
protected String documentTypeName; |
58 | |
protected String routeNodeName; |
59 | |
protected boolean actionDetailsAtRoleMemberLevel; |
60 | |
protected boolean required; |
61 | |
protected String qualifierResolverProvidedIdentifier; |
62 | |
|
63 | |
protected DocumentTypeEBO documentType; |
64 | |
|
65 | 0 | public ReviewResponsibility() { |
66 | 0 | } |
67 | |
|
68 | 0 | public ReviewResponsibility( KimResponsibility resp ) { |
69 | 0 | loadFromKimResponsibility(resp); |
70 | 0 | } |
71 | |
|
72 | |
public void loadFromKimResponsibility( KimResponsibility resp ) { |
73 | 0 | setResponsibilityId( resp.getResponsibilityId() ); |
74 | 0 | setNamespaceCode( resp.getNamespaceCode() ); |
75 | 0 | setName( resp.getName() ); |
76 | 0 | setDescription( resp.getDescription() ); |
77 | 0 | setActive( resp.isActive() ); |
78 | 0 | AttributeSet respDetails = resp.getDetails(); |
79 | 0 | setDocumentTypeName( respDetails.get( KimAttributes.DOCUMENT_TYPE_NAME ) ); |
80 | 0 | setRouteNodeName( respDetails.get( KimAttributes.ROUTE_NODE_NAME ) ); |
81 | 0 | setActionDetailsAtRoleMemberLevel( Boolean.valueOf( respDetails.get( KimAttributes.ACTION_DETAILS_AT_ROLE_MEMBER_LEVEL ) ) ); |
82 | 0 | setRequired( Boolean.valueOf( respDetails.get( KimAttributes.REQUIRED ) ) ); |
83 | 0 | setQualifierResolverProvidedIdentifier( respDetails.get( KimAttributes.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER ) ); |
84 | 0 | } |
85 | |
|
86 | |
|
87 | |
|
88 | |
|
89 | |
public String getResponsibilityId() { |
90 | 0 | return this.responsibilityId; |
91 | |
} |
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
public void setResponsibilityId(String responsibilityId) { |
97 | 0 | this.responsibilityId = responsibilityId; |
98 | 0 | } |
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
public String getNamespaceCode() { |
104 | 0 | return this.namespaceCode; |
105 | |
} |
106 | |
|
107 | |
|
108 | |
|
109 | |
|
110 | |
public void setNamespaceCode(String namespaceCode) { |
111 | 0 | this.namespaceCode = namespaceCode; |
112 | 0 | } |
113 | |
|
114 | |
|
115 | |
|
116 | |
|
117 | |
public String getName() { |
118 | 0 | return this.name; |
119 | |
} |
120 | |
|
121 | |
|
122 | |
|
123 | |
|
124 | |
public void setName(String name) { |
125 | 0 | this.name = name; |
126 | 0 | } |
127 | |
|
128 | |
|
129 | |
|
130 | |
|
131 | |
public String getDescription() { |
132 | 0 | return this.description; |
133 | |
} |
134 | |
|
135 | |
|
136 | |
|
137 | |
|
138 | |
public void setDescription(String description) { |
139 | 0 | this.description = description; |
140 | 0 | } |
141 | |
|
142 | |
|
143 | |
|
144 | |
|
145 | |
public boolean isActive() { |
146 | 0 | return this.active; |
147 | |
} |
148 | |
|
149 | |
|
150 | |
|
151 | |
|
152 | |
public void setActive(boolean active) { |
153 | 0 | this.active = active; |
154 | 0 | } |
155 | |
|
156 | |
|
157 | |
|
158 | |
|
159 | |
public String getDocumentTypeName() { |
160 | 0 | return this.documentTypeName; |
161 | |
} |
162 | |
|
163 | |
|
164 | |
|
165 | |
|
166 | |
public void setDocumentTypeName(String documentTypeName) { |
167 | 0 | this.documentTypeName = documentTypeName; |
168 | 0 | } |
169 | |
|
170 | |
|
171 | |
|
172 | |
|
173 | |
public String getRouteNodeName() { |
174 | 0 | return this.routeNodeName; |
175 | |
} |
176 | |
|
177 | |
|
178 | |
|
179 | |
|
180 | |
public void setRouteNodeName(String routeNodeName) { |
181 | 0 | this.routeNodeName = routeNodeName; |
182 | 0 | } |
183 | |
|
184 | |
|
185 | |
|
186 | |
|
187 | |
public boolean isActionDetailsAtRoleMemberLevel() { |
188 | 0 | return this.actionDetailsAtRoleMemberLevel; |
189 | |
} |
190 | |
|
191 | |
|
192 | |
|
193 | |
|
194 | |
public void setActionDetailsAtRoleMemberLevel( |
195 | |
boolean actionDetailsAtRoleMemberLevel) { |
196 | 0 | this.actionDetailsAtRoleMemberLevel = actionDetailsAtRoleMemberLevel; |
197 | 0 | } |
198 | |
|
199 | |
|
200 | |
|
201 | |
|
202 | |
public boolean isRequired() { |
203 | 0 | return this.required; |
204 | |
} |
205 | |
|
206 | |
|
207 | |
|
208 | |
|
209 | |
public void setRequired(boolean required) { |
210 | 0 | this.required = required; |
211 | 0 | } |
212 | |
|
213 | |
|
214 | |
|
215 | |
|
216 | |
public String getQualifierResolverProvidedIdentifier() { |
217 | 0 | return this.qualifierResolverProvidedIdentifier; |
218 | |
} |
219 | |
|
220 | |
|
221 | |
|
222 | |
|
223 | |
public void setQualifierResolverProvidedIdentifier( |
224 | |
String qualifierResolverProvidedIdentifier) { |
225 | 0 | this.qualifierResolverProvidedIdentifier = qualifierResolverProvidedIdentifier; |
226 | 0 | } |
227 | |
|
228 | |
@SuppressWarnings("unchecked") |
229 | |
@Override |
230 | |
protected LinkedHashMap toStringMapper() { |
231 | 0 | LinkedHashMap<String,Object> m = new LinkedHashMap<String, Object>(); |
232 | 0 | m.put("responsibilityId", responsibilityId); |
233 | 0 | m.put("namespaceCode", namespaceCode); |
234 | 0 | m.put("name", name); |
235 | 0 | m.put("active", active); |
236 | 0 | m.put("documentTypeName", documentTypeName); |
237 | 0 | m.put("routeNodeName", routeNodeName); |
238 | 0 | m.put("required", required); |
239 | 0 | m.put("actionDetailsAtRoleMemberLevel", actionDetailsAtRoleMemberLevel); |
240 | 0 | m.put("qualifierResolverProvidedIdentifier", qualifierResolverProvidedIdentifier); |
241 | 0 | return m; |
242 | |
} |
243 | |
|
244 | |
public void refresh() { |
245 | |
|
246 | 0 | } |
247 | |
|
248 | |
@Override |
249 | |
public void refreshNonUpdateableReferences() { |
250 | |
|
251 | 0 | } |
252 | |
@Override |
253 | |
public void refreshReferenceObject(String referenceObjectName) { |
254 | |
|
255 | 0 | } |
256 | |
|
257 | |
|
258 | |
|
259 | |
|
260 | |
|
261 | |
|
262 | |
@Override |
263 | |
@PrePersist |
264 | |
public void beforeInsert() { |
265 | 0 | throw new UnsupportedOperationException( "This object should never be persisted."); |
266 | |
} |
267 | |
|
268 | |
|
269 | |
|
270 | |
|
271 | |
|
272 | |
|
273 | |
@Override |
274 | |
@PreUpdate |
275 | |
public void beforeUpdate() { |
276 | 0 | throw new UnsupportedOperationException( "This object should never be persisted."); |
277 | |
} |
278 | |
|
279 | |
|
280 | |
|
281 | |
|
282 | |
|
283 | |
|
284 | |
@Override |
285 | |
public void beforeInsert(PersistenceBroker persistenceBroker) |
286 | |
throws PersistenceBrokerException { |
287 | 0 | throw new UnsupportedOperationException( "This object should never be persisted."); |
288 | |
} |
289 | |
|
290 | |
|
291 | |
|
292 | |
|
293 | |
|
294 | |
|
295 | |
@Override |
296 | |
public void beforeUpdate(PersistenceBroker persistenceBroker) { |
297 | 0 | throw new UnsupportedOperationException( "This object should never be persisted."); |
298 | |
} |
299 | |
|
300 | |
|
301 | |
|
302 | |
|
303 | |
|
304 | |
|
305 | |
@Override |
306 | |
public void beforeDelete(PersistenceBroker persistenceBroker) |
307 | |
throws PersistenceBrokerException { |
308 | 0 | throw new UnsupportedOperationException( "This object should never be persisted."); |
309 | |
} |
310 | |
|
311 | |
public DocumentTypeEBO getDocumentType() { |
312 | 0 | return this.documentType; |
313 | |
} |
314 | |
|
315 | |
public void setDocumentType(DocumentTypeEBO documentType) { |
316 | 0 | this.documentType = documentType; |
317 | 0 | } |
318 | |
} |