1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.kim.impl.permission |
18 | |
|
19 | |
import javax.persistence.Column |
20 | |
import javax.persistence.Entity |
21 | |
import javax.persistence.Table |
22 | |
import org.kuali.rice.kim.api.common.attribute.KimAttributeData |
23 | |
import org.kuali.rice.kim.api.common.attribute.KimAttributeDataContract |
24 | |
import org.kuali.rice.kim.impl.common.attribute.KimAttributeBo |
25 | |
import org.kuali.rice.kim.impl.common.attribute.KimAttributeDataBo |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
@Entity |
31 | |
@Table(name="KRIM_PERM_ATTR_DATA_T") |
32 | |
public class PermissionAttributeBo extends KimAttributeDataBo implements KimAttributeDataContract { |
33 | |
|
34 | |
@Column(name="PERM_ID") |
35 | |
String assignedToId; |
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
static KimAttributeData to(PermissionAttributeBo bo) { |
43 | 1 | if (bo == null) { |
44 | 0 | return null |
45 | |
} |
46 | |
|
47 | 1 | return KimAttributeData.Builder.create(bo).build(); |
48 | |
} |
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
static PermissionAttributeBo from(KimAttributeData im) { |
56 | 1 | if (im == null) { |
57 | 0 | return null |
58 | |
} |
59 | |
|
60 | 1 | PermissionAttributeBo bo = new PermissionAttributeBo() |
61 | 1 | bo.id = im.id |
62 | 1 | bo.assignedToId = im.assignedToId |
63 | 1 | bo.kimAttribute = KimAttributeBo.from(im.kimAttribute) |
64 | 1 | bo.kimAttributeId = im.kimAttribute?.id |
65 | 1 | bo.attributeValue = bo.attributeValue |
66 | 1 | bo.kimTypeId = im.kimTypeId |
67 | 1 | bo.versionNumber = im.versionNumber |
68 | 1 | bo.objectId = im.objectId; |
69 | |
|
70 | 1 | return bo |
71 | |
} |
72 | |
} |