1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.kim.impl.group |
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 | |
@Entity |
28 | |
@Table(name="KRIM_GRP_ATTR_DATA_T") |
29 | |
public class GroupAttributeBo extends KimAttributeDataBo implements KimAttributeDataContract { |
30 | |
@Column(name="GRP_ID") |
31 | |
String assignedToId |
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
static KimAttributeData to(GroupAttributeBo bo) { |
39 | 1 | if (bo == null) { |
40 | 0 | return null |
41 | |
} |
42 | |
|
43 | 1 | return KimAttributeData.Builder.create(bo).build(); |
44 | |
} |
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
static GroupAttributeBo from(KimAttributeData im) { |
52 | 1 | if (im == null) { |
53 | 0 | return null |
54 | |
} |
55 | |
|
56 | 1 | GroupAttributeBo bo = new GroupAttributeBo() |
57 | 1 | bo.id = im.id |
58 | 1 | bo.assignedToId = im.assignedToId |
59 | 1 | bo.kimAttribute = KimAttributeBo.from(im.kimAttribute) |
60 | 1 | bo.kimAttributeId = im.kimAttribute?.id |
61 | 1 | bo.attributeValue = bo.attributeValue |
62 | 1 | bo.kimTypeId = im.kimTypeId |
63 | 1 | bo.versionNumber = im.versionNumber |
64 | 1 | bo.objectId = im.objectId; |
65 | |
|
66 | 1 | return bo |
67 | |
} |
68 | |
} |