| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
package org.kuali.rice.kim.impl.role; |
| 18 | |
|
| 19 | |
|
| 20 | |
import javax.persistence.Column |
| 21 | |
import javax.persistence.Entity |
| 22 | |
import javax.persistence.FetchType |
| 23 | |
import javax.persistence.Id |
| 24 | |
import javax.persistence.JoinColumn |
| 25 | |
import javax.persistence.ManyToOne |
| 26 | |
import javax.persistence.Table |
| 27 | |
import org.hibernate.annotations.Type |
| 28 | |
import org.kuali.rice.kim.api.role.RoleResponsibilityAction |
| 29 | |
import org.kuali.rice.kim.api.role.RoleResponsibilityActionContract |
| 30 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
@Entity |
| 39 | |
@Table(name = "KRIM_ROLE_RSP_ACTN_T") |
| 40 | |
public class RoleResponsibilityActionBo extends PersistableBusinessObjectBase implements RoleResponsibilityActionContract { |
| 41 | |
|
| 42 | |
private static final long serialVersionUID = -2840071737863303404L; |
| 43 | |
|
| 44 | |
@Id |
| 45 | |
@Column(name = "ROLE_RSP_ACTN_ID") |
| 46 | |
String id; |
| 47 | |
|
| 48 | |
@Column(name = "ROLE_RSP_ID") |
| 49 | |
String roleResponsibilityId; |
| 50 | |
|
| 51 | |
@Column(name = "ROLE_MBR_ID") |
| 52 | |
String roleMemberId; |
| 53 | |
|
| 54 | |
@Column(name = "ACTN_TYP_CD") |
| 55 | |
String actionTypeCode; |
| 56 | |
|
| 57 | |
@Column(name = "ACTN_PLCY_CD") |
| 58 | |
String actionPolicyCode; |
| 59 | |
|
| 60 | |
@Column(name = "FRC_ACTN") |
| 61 | |
@Type(type = "yes_no") |
| 62 | |
boolean forceAction; |
| 63 | |
|
| 64 | |
@Column(name = "PRIORITY_NBR") |
| 65 | |
Integer priorityNumber; |
| 66 | |
|
| 67 | |
@ManyToOne(targetEntity = RoleResponsibilityBo.class, fetch = FetchType.EAGER, cascade = []) |
| 68 | |
@JoinColumn(name = "ROLE_RSP_ID", insertable = false, updatable = false) |
| 69 | |
RoleResponsibilityBo roleResponsibility; |
| 70 | |
|
| 71 | |
public RoleResponsibilityBo getRoleResponsibility() { |
| 72 | 0 | return roleResponsibility |
| 73 | |
} |
| 74 | |
|
| 75 | |
|
| 76 | |
public static RoleResponsibilityAction to(RoleResponsibilityActionBo bo) { |
| 77 | 0 | if (bo == null) { return null;} |
| 78 | 0 | return RoleResponsibilityAction.Builder.create(bo).build(); |
| 79 | |
} |
| 80 | |
|
| 81 | |
public static RoleResponsibilityActionBo from(RoleResponsibilityAction immutable) { |
| 82 | 0 | if (immutable == null) { return null;} |
| 83 | |
|
| 84 | 0 | RoleResponsibilityActionBo bo = new RoleResponsibilityActionBo(); |
| 85 | 0 | bo.id = immutable.getId(); |
| 86 | 0 | bo.roleResponsibilityId = immutable.getRoleResponsibilityId(); |
| 87 | 0 | bo.roleMemberId = immutable.getRoleMemberId(); |
| 88 | 0 | bo.actionTypeCode = immutable.getActionTypeCode(); |
| 89 | 0 | bo.actionPolicyCode = immutable.getActionPolicyCode(); |
| 90 | 0 | bo.forceAction = immutable.isForceAction(); |
| 91 | 0 | bo.priorityNumber = immutable.getPriorityNumber(); |
| 92 | 0 | bo.roleResponsibility = RoleResponsibilityBo.from(immutable.getRoleResponsibility()); |
| 93 | 0 | bo.versionNumber = immutable.getVersionNumber(); |
| 94 | 0 | return bo; |
| 95 | |
} |
| 96 | |
} |