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