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.kim.impl.responsibility.ResponsibilityBo; |
22 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; |
23 | |
|
24 | |
import javax.persistence.Column; |
25 | |
import javax.persistence.Entity; |
26 | |
import javax.persistence.FetchType; |
27 | |
import javax.persistence.Id; |
28 | |
import javax.persistence.JoinColumn; |
29 | |
import javax.persistence.ManyToOne; |
30 | |
import javax.persistence.Table; |
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
@Entity |
36 | |
@Table(name="KRIM_ROLE_RSP_T") |
37 | 0 | public class RoleResponsibilityImpl extends PersistableBusinessObjectBase implements RoleResponsibility { |
38 | |
private static final long serialVersionUID = 1L; |
39 | |
|
40 | |
@Id |
41 | |
@Column(name="ROLE_RSP_ID") |
42 | |
protected String roleResponsibilityId; |
43 | |
@Column(name="ROLE_ID") |
44 | |
protected String roleId; |
45 | |
@Column(name="RSP_ID") |
46 | |
protected String responsibilityId; |
47 | |
@Type(type="yes_no") |
48 | |
@Column(name="ACTV_IND") |
49 | |
protected boolean active; |
50 | |
|
51 | |
@ManyToOne(targetEntity=ResponsibilityBo.class, fetch = FetchType.EAGER, cascade = { }) |
52 | |
@JoinColumn(name = "RSP_ID", insertable = false, updatable = false) |
53 | |
protected ResponsibilityBo kimResponsibility; |
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
public String getResponsibilityId() { |
59 | 0 | return responsibilityId; |
60 | |
} |
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
public String getRoleId() { |
66 | 0 | return roleId; |
67 | |
} |
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
public String getRoleResponsibilityId() { |
73 | 0 | return roleResponsibilityId; |
74 | |
} |
75 | |
|
76 | |
public void setResponsibilityId(String responsibilityId) { |
77 | 0 | this.responsibilityId = responsibilityId; |
78 | 0 | } |
79 | |
|
80 | |
public void setRoleId(String roleId) { |
81 | 0 | this.roleId = roleId; |
82 | 0 | } |
83 | |
|
84 | |
public boolean isActive() { |
85 | 0 | return this.active; |
86 | |
} |
87 | |
|
88 | |
public void setActive(boolean active) { |
89 | 0 | this.active = active; |
90 | 0 | } |
91 | |
|
92 | |
public void setRoleResponsibilityId(String roleResponsibilityId) { |
93 | 0 | this.roleResponsibilityId = roleResponsibilityId; |
94 | 0 | } |
95 | |
|
96 | |
public ResponsibilityBo getKimResponsibility() { |
97 | 0 | return this.kimResponsibility; |
98 | |
} |
99 | |
|
100 | |
public void setKimResponsibility(ResponsibilityBo kimResponsibility) { |
101 | 0 | this.kimResponsibility = kimResponsibility; |
102 | 0 | } |
103 | |
|
104 | |
public RoleResponsibilityInfo toSimpleInfo() { |
105 | 0 | RoleResponsibilityInfo roleResponsibilityInfo = new RoleResponsibilityInfo(); |
106 | 0 | roleResponsibilityInfo.setRoleId(getRoleId()); |
107 | 0 | roleResponsibilityInfo.setResponsibilityId(getResponsibilityId()); |
108 | 0 | roleResponsibilityInfo.setRoleResponsibilityId(getRoleResponsibilityId()); |
109 | 0 | roleResponsibilityInfo.setKimResponsibilityInfo(ResponsibilityBo.to(getKimResponsibility())); |
110 | 0 | return roleResponsibilityInfo; |
111 | |
} |
112 | |
|
113 | |
} |