1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs;
17
18 import org.kuali.rice.kim.impl.role.RoleBo;
19 import org.kuali.rice.kim.impl.role.RoleMemberBo;
20 import org.kuali.rice.krad.bo.DataObjectBase;
21 import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
22 import org.kuali.rice.krad.data.provider.annotation.Relationship;
23
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.Id;
28 import javax.persistence.Table;
29 import javax.persistence.Transient;
30
31
32
33
34 @Entity
35 @Table(name = "KRIM_ROLE_MBR_T")
36 public class LabsRoleMember extends DataObjectBase {
37
38 @Id
39 @GeneratedValue(generator = "KRIM_ROLE_MBR_ID_S")
40 @PortableSequenceGenerator(name = "KRIM_ROLE_MBR_ID_S")
41 @Column(name = "ROLE_MBR_ID")
42 private String id;
43
44 private RoleMemberBo roleMember;
45
46 @Column(name = "ROLE_ID")
47 private String roleId;
48
49 @Relationship(foreignKeyFields="roleId")
50 @Transient
51 private RoleBo role;
52
53 private String roleNamespaceCode;
54
55 private String roleName;
56
57 private String roleDescription;
58
59 public String getId() {
60 return id;
61 }
62
63 public void setId(String id) {
64 this.id = id;
65 }
66
67 public RoleMemberBo getRoleMember() {
68 return roleMember;
69 }
70
71 public void setRoleMember(RoleMemberBo roleMember) {
72 this.roleMember = roleMember;
73 }
74
75 public String getRoleId() {
76 return roleId;
77 }
78
79 public void setRoleId(String roleId) {
80 this.roleId = roleId;
81 }
82
83 public RoleBo getRole() {
84 return role;
85 }
86
87 public void setRole(RoleBo role) {
88 this.role = role;
89 }
90
91 public String getRoleNamespaceCode() {
92 if (getRole() != null) {
93 roleNamespaceCode = getRole().getNamespaceCode();
94 }
95
96 return roleNamespaceCode;
97 }
98
99 public void setRoleNamespaceCode(String roleNamespaceCode) {
100 this.roleNamespaceCode = roleNamespaceCode;
101 }
102
103 public String getRoleName() {
104 if (getRole() != null) {
105 roleName = getRole().getName();
106 }
107
108 return roleName;
109 }
110
111 public void setRoleName(String roleName) {
112 this.roleName = roleName;
113 }
114
115 public String getRoleDescription() {
116 if (getRole() != null) {
117 roleDescription = getRole().getDescription();
118 }
119
120 return roleDescription;
121 }
122
123 public void setRoleDescription(String roleDescription) {
124 this.roleDescription = roleDescription;
125 }
126 }