1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.bo.ui;
17
18 import java.util.LinkedHashMap;
19 import java.util.List;
20
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.Id;
24 import javax.persistence.Table;
25
26 import org.kuali.rice.kim.bo.role.impl.KimResponsibilityImpl;
27 import org.kuali.rice.kim.service.KIMServiceLocator;
28 import org.kuali.rice.kim.service.impl.ResponsibilityServiceImpl;
29 import org.kuali.rice.kns.util.TypedArrayList;
30
31
32
33
34 @Entity
35 @Table(name="KRIM_PND_ROLE_RSP_T")
36 public class KimDocumentRoleResponsibility extends KimDocumentBoBase {
37
38 private static final long serialVersionUID = -4465768714850961538L;
39 @Id
40 @Column(name="ROLE_RSP_ID")
41 protected String roleResponsibilityId;
42 @Column(name="ROLE_ID")
43 protected String roleId;
44 @Column(name="RSP_ID")
45 protected String responsibilityId;
46
47 protected KimResponsibilityImpl kimResponsibility;
48
49 protected List<KimDocumentRoleResponsibilityAction> roleRspActions = new TypedArrayList(KimDocumentRoleResponsibilityAction.class);
50
51 public String getRoleId() {
52 return roleId;
53 }
54
55 public void setRoleId(String roleId) {
56 this.roleId = roleId;
57 }
58
59
60
61
62 @SuppressWarnings("unchecked")
63 @Override
64 protected LinkedHashMap toStringMapper() {
65 LinkedHashMap m = new LinkedHashMap();
66 m.put( "roleResponsibilityId", roleResponsibilityId );
67 m.put( "roleId", roleId );
68 m.put( "responsibilityId", responsibilityId );
69 return m;
70 }
71
72 public void setRoleResponsibilityId(String roleResponsibilityId) {
73 this.roleResponsibilityId = roleResponsibilityId;
74 }
75
76
77
78
79 public String getRoleResponsibilityId() {
80 return this.roleResponsibilityId;
81 }
82
83
84
85
86 public KimResponsibilityImpl getKimResponsibility() {
87 if ( kimResponsibility == null && responsibilityId != null ) {
88
89
90
91 kimResponsibility = ((ResponsibilityServiceImpl)KIMServiceLocator.getResponsibilityService()).getResponsibilityImpl(getResponsibilityId());
92 }
93 return this.kimResponsibility;
94 }
95
96
97
98
99 public void setResponsibilityId(String responsibilityId) {
100 this.responsibilityId = responsibilityId;
101 }
102
103
104
105
106 public void setKimResponsibility(KimResponsibilityImpl kimResponsibility) {
107 this.kimResponsibility = kimResponsibility;
108 }
109
110
111
112
113 public String getResponsibilityId() {
114 return this.responsibilityId;
115 }
116
117
118
119
120 public KimDocumentRoleResponsibilityAction getRoleRspAction() {
121 if(this.roleRspActions!=null && this.roleRspActions.size()>0)
122 return this.roleRspActions.get(0);
123 return null;
124 }
125
126
127
128
129 public List<KimDocumentRoleResponsibilityAction> getRoleRspActions() {
130 return this.roleRspActions;
131 }
132
133
134
135
136 public void setRoleRspActions(
137 List<KimDocumentRoleResponsibilityAction> roleRspActions) {
138 this.roleRspActions = roleRspActions;
139 }
140
141 @Override
142 public boolean isActive() {
143 return this.active;
144 }
145
146 }