1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.bo.role.impl; |
17 | |
|
18 | |
import org.hibernate.annotations.Type; |
19 | |
import org.kuali.rice.kim.bo.role.RoleResponsibility; |
20 | |
import org.kuali.rice.kim.bo.role.dto.RoleResponsibilityInfo; |
21 | |
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; |
22 | |
|
23 | |
import javax.persistence.*; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
@Entity |
29 | |
@Table(name="KRIM_ROLE_RSP_T") |
30 | 0 | public class RoleResponsibilityImpl extends PersistableBusinessObjectBase implements RoleResponsibility { |
31 | |
private static final long serialVersionUID = 1L; |
32 | |
|
33 | |
@Id |
34 | |
@Column(name="ROLE_RSP_ID") |
35 | |
protected String roleResponsibilityId; |
36 | |
@Column(name="ROLE_ID") |
37 | |
protected String roleId; |
38 | |
@Column(name="RSP_ID") |
39 | |
protected String responsibilityId; |
40 | |
@Type(type="yes_no") |
41 | |
@Column(name="ACTV_IND") |
42 | |
protected boolean active; |
43 | |
|
44 | |
@ManyToOne(targetEntity=KimResponsibilityImpl.class, fetch = FetchType.EAGER, cascade = { }) |
45 | |
@JoinColumn(name = "RSP_ID", insertable = false, updatable = false) |
46 | |
protected KimResponsibilityImpl kimResponsibility; |
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
public String getResponsibilityId() { |
52 | 0 | return responsibilityId; |
53 | |
} |
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
public String getRoleId() { |
59 | 0 | return roleId; |
60 | |
} |
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
public String getRoleResponsibilityId() { |
66 | 0 | return roleResponsibilityId; |
67 | |
} |
68 | |
|
69 | |
public void setResponsibilityId(String responsibilityId) { |
70 | 0 | this.responsibilityId = responsibilityId; |
71 | 0 | } |
72 | |
|
73 | |
public void setRoleId(String roleId) { |
74 | 0 | this.roleId = roleId; |
75 | 0 | } |
76 | |
|
77 | |
public boolean isActive() { |
78 | 0 | return this.active; |
79 | |
} |
80 | |
|
81 | |
public void setActive(boolean active) { |
82 | 0 | this.active = active; |
83 | 0 | } |
84 | |
|
85 | |
public void setRoleResponsibilityId(String roleResponsibilityId) { |
86 | 0 | this.roleResponsibilityId = roleResponsibilityId; |
87 | 0 | } |
88 | |
|
89 | |
public KimResponsibilityImpl getKimResponsibility() { |
90 | 0 | return this.kimResponsibility; |
91 | |
} |
92 | |
|
93 | |
public void setKimResponsibility(KimResponsibilityImpl kimResponsibility) { |
94 | 0 | this.kimResponsibility = kimResponsibility; |
95 | 0 | } |
96 | |
|
97 | |
public RoleResponsibilityInfo toSimpleInfo() { |
98 | 0 | RoleResponsibilityInfo roleResponsibilityInfo = new RoleResponsibilityInfo(); |
99 | 0 | roleResponsibilityInfo.setRoleId(getRoleId()); |
100 | 0 | roleResponsibilityInfo.setResponsibilityId(getResponsibilityId()); |
101 | 0 | roleResponsibilityInfo.setRoleResponsibilityId(getRoleResponsibilityId()); |
102 | 0 | roleResponsibilityInfo.setKimResponsibilityInfo(getKimResponsibility().toSimpleInfo()); |
103 | 0 | return roleResponsibilityInfo; |
104 | |
} |
105 | |
|
106 | |
} |