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