| 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 javax.persistence.Column; |
| 19 | |
import javax.persistence.Entity; |
| 20 | |
import javax.persistence.GeneratedValue; |
| 21 | |
import javax.persistence.Id; |
| 22 | |
import javax.persistence.IdClass; |
| 23 | |
import javax.persistence.Table; |
| 24 | |
import javax.persistence.Transient; |
| 25 | |
|
| 26 | |
import org.hibernate.annotations.GenericGenerator; |
| 27 | |
import org.hibernate.annotations.Parameter; |
| 28 | |
import org.kuali.rice.kew.util.CodeTranslator; |
| 29 | |
import org.kuali.rice.kim.bo.role.impl.KimResponsibilityImpl; |
| 30 | |
import org.kuali.rice.kim.bo.role.impl.RoleResponsibilityImpl; |
| 31 | |
import org.kuali.rice.kim.service.KIMServiceLocator; |
| 32 | |
import org.kuali.rice.kim.service.KIMServiceLocatorInternal; |
| 33 | |
import org.kuali.rice.kim.service.impl.ResponsibilityServiceImpl; |
| 34 | |
import org.kuali.rice.kns.util.ObjectUtils; |
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | |
|
| 41 | |
|
| 42 | |
@IdClass(KimDocumentRoleResponsibilityActionId.class) |
| 43 | |
@Entity |
| 44 | |
@Table(name="KRIM_PND_ROLE_RSP_ACTN_MT") |
| 45 | 0 | public class KimDocumentRoleResponsibilityAction extends KimDocumentBoEditableBase { |
| 46 | |
private static final long serialVersionUID = 696663543888096105L; |
| 47 | |
@Id |
| 48 | |
@GeneratedValue(generator="KRIM_ROLE_RSP_ACTN_ID_S") |
| 49 | |
@GenericGenerator(name="KRIM_ROLE_RSP_ACTN_ID_S",strategy="org.kuali.rice.core.jpa.spring.RiceNumericStringSequenceStyleGenerator",parameters={ |
| 50 | |
@Parameter(name="sequence_name",value="KRIM_ROLE_RSP_ACTN_ID_S"), |
| 51 | |
@Parameter(name="value_column",value="id") |
| 52 | |
}) |
| 53 | |
@Column(name="ROLE_RSP_ACTN_ID") |
| 54 | |
protected String roleResponsibilityActionId; |
| 55 | |
@Column(name="ROLE_RSP_ID") |
| 56 | |
protected String roleResponsibilityId; |
| 57 | |
@Column(name="ROLE_MBR_ID") |
| 58 | |
protected String roleMemberId; |
| 59 | |
@Column(name="ACTN_TYP_CD") |
| 60 | |
protected String actionTypeCode; |
| 61 | |
@Column(name="ACTN_PLCY_CD") |
| 62 | |
protected String actionPolicyCode; |
| 63 | |
@Column(name="PRIORITY_NBR") |
| 64 | |
protected Integer priorityNumber; |
| 65 | |
@Column(name="FRC_ACTN") |
| 66 | |
protected boolean forceAction; |
| 67 | |
@Transient |
| 68 | |
protected KimResponsibilityImpl kimResponsibility; |
| 69 | |
@Transient |
| 70 | |
protected RoleResponsibilityImpl roleResponsibility; |
| 71 | |
|
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
|
| 76 | |
|
| 77 | |
|
| 78 | |
|
| 79 | |
|
| 80 | |
|
| 81 | |
public KimResponsibilityImpl getKimResponsibility() { |
| 82 | |
try { |
| 83 | 0 | if ( ObjectUtils.isNull( kimResponsibility ) && ObjectUtils.isNotNull( getRoleResponsibility() ) ) { |
| 84 | |
|
| 85 | |
|
| 86 | |
|
| 87 | 0 | kimResponsibility = ((ResponsibilityServiceImpl) KIMServiceLocator.getResponsibilityService()).getResponsibilityImpl(getRoleResponsibility().getResponsibilityId()); |
| 88 | |
} |
| 89 | 0 | } catch( RuntimeException ex ) { |
| 90 | 0 | ex.printStackTrace(); |
| 91 | 0 | throw ex; |
| 92 | 0 | } |
| 93 | 0 | return kimResponsibility; |
| 94 | |
} |
| 95 | |
|
| 96 | |
|
| 97 | |
|
| 98 | |
public void setKimResponsibility(KimResponsibilityImpl kimResponsibility) { |
| 99 | 0 | this.kimResponsibility = kimResponsibility; |
| 100 | 0 | } |
| 101 | |
public String getRoleResponsibilityActionId() { |
| 102 | 0 | return this.roleResponsibilityActionId; |
| 103 | |
} |
| 104 | |
public void setRoleResponsibilityActionId(String roleResponsibilityResolutionId) { |
| 105 | 0 | this.roleResponsibilityActionId = roleResponsibilityResolutionId; |
| 106 | 0 | } |
| 107 | |
public String getRoleResponsibilityId() { |
| 108 | 0 | return this.roleResponsibilityId; |
| 109 | |
} |
| 110 | |
public void setRoleResponsibilityId(String roleResponsibilityId) { |
| 111 | 0 | this.roleResponsibilityId = roleResponsibilityId; |
| 112 | 0 | } |
| 113 | |
public String getActionTypeCode() { |
| 114 | 0 | return this.actionTypeCode; |
| 115 | |
} |
| 116 | |
public void setActionTypeCode(String actionTypeCode) { |
| 117 | 0 | this.actionTypeCode = actionTypeCode; |
| 118 | 0 | } |
| 119 | |
public Integer getPriorityNumber() { |
| 120 | 0 | return this.priorityNumber; |
| 121 | |
} |
| 122 | |
public void setPriorityNumber(Integer priorityNumber) { |
| 123 | 0 | this.priorityNumber = priorityNumber; |
| 124 | 0 | } |
| 125 | |
|
| 126 | |
public String getActionPolicyCode() { |
| 127 | 0 | return this.actionPolicyCode; |
| 128 | |
} |
| 129 | |
public void setActionPolicyCode(String actionPolicyCode) { |
| 130 | 0 | this.actionPolicyCode = actionPolicyCode; |
| 131 | 0 | } |
| 132 | |
public String getRoleMemberId() { |
| 133 | 0 | return this.roleMemberId; |
| 134 | |
} |
| 135 | |
public void setRoleMemberId(String roleMemberId) { |
| 136 | 0 | this.roleMemberId = roleMemberId; |
| 137 | 0 | } |
| 138 | |
|
| 139 | |
|
| 140 | |
|
| 141 | |
|
| 142 | |
|
| 143 | |
|
| 144 | |
|
| 145 | |
public String getActionPolicyDescription() { |
| 146 | 0 | return (String)CodeTranslator.approvePolicyLabels.get(this.actionPolicyCode); |
| 147 | |
} |
| 148 | |
|
| 149 | |
|
| 150 | |
|
| 151 | |
|
| 152 | |
|
| 153 | |
|
| 154 | |
|
| 155 | |
public String getActionTypeDescription() { |
| 156 | 0 | return (String)CodeTranslator.arLabels.get(this.actionTypeCode); |
| 157 | |
} |
| 158 | |
|
| 159 | |
|
| 160 | |
|
| 161 | |
public RoleResponsibilityImpl getRoleResponsibility() { |
| 162 | 0 | if ( ObjectUtils.isNull( roleResponsibility ) && roleResponsibilityId != null ) { |
| 163 | |
|
| 164 | |
|
| 165 | |
|
| 166 | 0 | roleResponsibility = ((ResponsibilityServiceImpl) KIMServiceLocator.getResponsibilityService()).getRoleResponsibilityImpl(getRoleResponsibilityId()); |
| 167 | |
} |
| 168 | 0 | return roleResponsibility; |
| 169 | |
} |
| 170 | |
|
| 171 | |
|
| 172 | |
|
| 173 | |
public void setRoleResponsibility(RoleResponsibilityImpl roleResponsibility) { |
| 174 | 0 | this.roleResponsibility = roleResponsibility; |
| 175 | 0 | } |
| 176 | |
|
| 177 | |
|
| 178 | |
|
| 179 | |
|
| 180 | |
public boolean isForceAction() { |
| 181 | 0 | return this.forceAction; |
| 182 | |
} |
| 183 | |
|
| 184 | |
|
| 185 | |
|
| 186 | |
public void setForceAction(boolean forceAction) { |
| 187 | 0 | this.forceAction = forceAction; |
| 188 | 0 | } |
| 189 | |
|
| 190 | |
} |