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 java.util.List;
19 import java.util.Map;
20
21 import javax.persistence.Column;
22 import javax.persistence.MappedSuperclass;
23 import javax.persistence.Transient;
24
25 import org.kuali.rice.kim.api.group.Group;
26 import org.kuali.rice.kim.api.identity.Person;
27 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
28 import org.kuali.rice.kim.framework.group.GroupEbo;
29 import org.kuali.rice.kim.impl.type.KimTypeBo;
30 import org.kuali.rice.krad.bo.DataObjectBase;
31 import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
32
33 @MappedSuperclass
34 public abstract class GroupBase extends DataObjectBase implements GroupEbo {
35 private static final long serialVersionUID = 1L;
36
37 @Column(name="GRP_NM")
38 private String name;
39
40 @Column(name="GRP_DESC",length=4000)
41 private String description;
42
43 @Column(name="ACTV_IND")
44 @javax.persistence.Convert(converter=BooleanYNConverter.class)
45 private boolean active;
46
47 @Column(name="KIM_TYP_ID")
48 private String kimTypeId;
49
50 @Column(name="NMSPC_CD")
51 private String namespaceCode;
52
53 @Transient
54 private List<Person> memberPersons;
55
56 @Transient
57 private List<Group> memberGroups;
58
59 @Transient
60 protected Map<String,String> attributes;
61
62
63 @Override
64 public Map<String,String> getAttributes() {
65 return attributes;
66 }
67
68 public void setAttributes(Map<String, String> attributes) {
69 this.attributes = attributes;
70 }
71
72 @Override
73 public String getName() {
74 return name;
75 }
76
77 public void setName(String name) {
78 this.name = name;
79 }
80
81 @Override
82 public String getDescription() {
83 return description;
84 }
85
86 public void setDescription(String description) {
87 this.description = description;
88 }
89
90 @Override
91 public boolean isActive() {
92 return active;
93 }
94
95 public void setActive(boolean active) {
96 this.active = active;
97 }
98
99 @Override
100 public String getKimTypeId() {
101 return kimTypeId;
102 }
103
104 public void setKimTypeId(String kimTypeId) {
105 this.kimTypeId = kimTypeId;
106 }
107
108 @Override
109 public String getNamespaceCode() {
110 return namespaceCode;
111 }
112
113 public void setNamespaceCode(String namespaceCode) {
114 this.namespaceCode = namespaceCode;
115 }
116
117 public KimTypeBo getKimTypeInfo() {
118 return KimTypeBo.from(KimApiServiceLocator.getKimTypeInfoService().getKimType(this.kimTypeId));
119 }
120
121 @Override
122 public void refresh() {
123 }
124 }