| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kim.bo.impl; |
| 17 | |
|
| 18 | |
import org.hibernate.annotations.Type; |
| 19 | |
import org.kuali.rice.core.xml.dto.AttributeSet; |
| 20 | |
import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO; |
| 21 | |
import org.kuali.rice.kim.bo.role.KimResponsibility; |
| 22 | |
import org.kuali.rice.kim.util.KimConstants; |
| 23 | |
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; |
| 24 | |
|
| 25 | |
import javax.persistence.*; |
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
@SuppressWarnings("unchecked") |
| 35 | |
@Entity |
| 36 | |
@Table(name="KRIM_RSP_T") |
| 37 | |
public class ReviewResponsibility extends PersistableBusinessObjectBase { |
| 38 | |
|
| 39 | |
private static final long serialVersionUID = 1L; |
| 40 | |
@Transient |
| 41 | |
public static final String ACTION_DETAILS_AT_ROLE_MEMBER_LEVEL_FIELD_NAME = "actionDetailsAtRoleMemberLevel"; |
| 42 | |
|
| 43 | |
|
| 44 | |
@Id |
| 45 | |
@Column(name="RSP_ID") |
| 46 | |
protected String responsibilityId; |
| 47 | |
@Column(name="NMSPC_CD") |
| 48 | |
protected String namespaceCode; |
| 49 | |
@Column(name="NM") |
| 50 | |
protected String name; |
| 51 | |
@Column(name="DESC_TXT", length=400) |
| 52 | |
protected String description; |
| 53 | |
@Type(type="yes_no") |
| 54 | |
@Column(name="ACTV_IND") |
| 55 | |
protected boolean active; |
| 56 | |
|
| 57 | |
|
| 58 | |
@Transient |
| 59 | |
protected String documentTypeName; |
| 60 | |
@Transient |
| 61 | |
protected String routeNodeName; |
| 62 | |
@Transient |
| 63 | |
protected boolean actionDetailsAtRoleMemberLevel; |
| 64 | |
@Transient |
| 65 | |
protected boolean required; |
| 66 | |
@Transient |
| 67 | |
protected String qualifierResolverProvidedIdentifier; |
| 68 | |
|
| 69 | |
@Transient |
| 70 | |
protected DocumentTypeEBO documentType; |
| 71 | |
|
| 72 | 0 | public ReviewResponsibility() { |
| 73 | 0 | } |
| 74 | |
|
| 75 | 0 | public ReviewResponsibility( KimResponsibility resp ) { |
| 76 | 0 | loadFromKimResponsibility(resp); |
| 77 | 0 | } |
| 78 | |
|
| 79 | |
public void loadFromKimResponsibility( KimResponsibility resp ) { |
| 80 | 0 | setResponsibilityId( resp.getResponsibilityId() ); |
| 81 | 0 | setNamespaceCode( resp.getNamespaceCode() ); |
| 82 | 0 | setName( resp.getName() ); |
| 83 | 0 | setDescription( resp.getDescription() ); |
| 84 | 0 | setActive( resp.isActive() ); |
| 85 | 0 | AttributeSet respDetails = resp.getDetails(); |
| 86 | 0 | setDocumentTypeName( respDetails.get( KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME ) ); |
| 87 | 0 | setRouteNodeName( respDetails.get( KimConstants.AttributeConstants.ROUTE_NODE_NAME ) ); |
| 88 | 0 | setActionDetailsAtRoleMemberLevel( Boolean.valueOf( respDetails.get( KimConstants.AttributeConstants.ACTION_DETAILS_AT_ROLE_MEMBER_LEVEL ) ) ); |
| 89 | 0 | setRequired( Boolean.valueOf( respDetails.get( KimConstants.AttributeConstants.REQUIRED ) ) ); |
| 90 | 0 | setQualifierResolverProvidedIdentifier( respDetails.get( KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER ) ); |
| 91 | 0 | } |
| 92 | |
|
| 93 | |
|
| 94 | |
|
| 95 | |
|
| 96 | |
public String getResponsibilityId() { |
| 97 | 0 | return this.responsibilityId; |
| 98 | |
} |
| 99 | |
|
| 100 | |
|
| 101 | |
|
| 102 | |
|
| 103 | |
public void setResponsibilityId(String responsibilityId) { |
| 104 | 0 | this.responsibilityId = responsibilityId; |
| 105 | 0 | } |
| 106 | |
|
| 107 | |
|
| 108 | |
|
| 109 | |
|
| 110 | |
public String getNamespaceCode() { |
| 111 | 0 | return this.namespaceCode; |
| 112 | |
} |
| 113 | |
|
| 114 | |
|
| 115 | |
|
| 116 | |
|
| 117 | |
public void setNamespaceCode(String namespaceCode) { |
| 118 | 0 | this.namespaceCode = namespaceCode; |
| 119 | 0 | } |
| 120 | |
|
| 121 | |
|
| 122 | |
|
| 123 | |
|
| 124 | |
public String getName() { |
| 125 | 0 | return this.name; |
| 126 | |
} |
| 127 | |
|
| 128 | |
|
| 129 | |
|
| 130 | |
|
| 131 | |
public void setName(String name) { |
| 132 | 0 | this.name = name; |
| 133 | 0 | } |
| 134 | |
|
| 135 | |
|
| 136 | |
|
| 137 | |
|
| 138 | |
public String getDescription() { |
| 139 | 0 | return this.description; |
| 140 | |
} |
| 141 | |
|
| 142 | |
|
| 143 | |
|
| 144 | |
|
| 145 | |
public void setDescription(String description) { |
| 146 | 0 | this.description = description; |
| 147 | 0 | } |
| 148 | |
|
| 149 | |
|
| 150 | |
|
| 151 | |
|
| 152 | |
public boolean isActive() { |
| 153 | 0 | return this.active; |
| 154 | |
} |
| 155 | |
|
| 156 | |
|
| 157 | |
|
| 158 | |
|
| 159 | |
public void setActive(boolean active) { |
| 160 | 0 | this.active = active; |
| 161 | 0 | } |
| 162 | |
|
| 163 | |
|
| 164 | |
|
| 165 | |
|
| 166 | |
public String getDocumentTypeName() { |
| 167 | 0 | return this.documentTypeName; |
| 168 | |
} |
| 169 | |
|
| 170 | |
|
| 171 | |
|
| 172 | |
|
| 173 | |
public void setDocumentTypeName(String documentTypeName) { |
| 174 | 0 | this.documentTypeName = documentTypeName; |
| 175 | 0 | } |
| 176 | |
|
| 177 | |
|
| 178 | |
|
| 179 | |
|
| 180 | |
public String getRouteNodeName() { |
| 181 | 0 | return this.routeNodeName; |
| 182 | |
} |
| 183 | |
|
| 184 | |
|
| 185 | |
|
| 186 | |
|
| 187 | |
public void setRouteNodeName(String routeNodeName) { |
| 188 | 0 | this.routeNodeName = routeNodeName; |
| 189 | 0 | } |
| 190 | |
|
| 191 | |
|
| 192 | |
|
| 193 | |
|
| 194 | |
public boolean isActionDetailsAtRoleMemberLevel() { |
| 195 | 0 | return this.actionDetailsAtRoleMemberLevel; |
| 196 | |
} |
| 197 | |
|
| 198 | |
|
| 199 | |
|
| 200 | |
|
| 201 | |
public void setActionDetailsAtRoleMemberLevel( |
| 202 | |
boolean actionDetailsAtRoleMemberLevel) { |
| 203 | 0 | this.actionDetailsAtRoleMemberLevel = actionDetailsAtRoleMemberLevel; |
| 204 | 0 | } |
| 205 | |
|
| 206 | |
|
| 207 | |
|
| 208 | |
|
| 209 | |
public boolean isRequired() { |
| 210 | 0 | return this.required; |
| 211 | |
} |
| 212 | |
|
| 213 | |
|
| 214 | |
|
| 215 | |
|
| 216 | |
public void setRequired(boolean required) { |
| 217 | 0 | this.required = required; |
| 218 | 0 | } |
| 219 | |
|
| 220 | |
|
| 221 | |
|
| 222 | |
|
| 223 | |
public String getQualifierResolverProvidedIdentifier() { |
| 224 | 0 | return this.qualifierResolverProvidedIdentifier; |
| 225 | |
} |
| 226 | |
|
| 227 | |
|
| 228 | |
|
| 229 | |
|
| 230 | |
public void setQualifierResolverProvidedIdentifier( |
| 231 | |
String qualifierResolverProvidedIdentifier) { |
| 232 | 0 | this.qualifierResolverProvidedIdentifier = qualifierResolverProvidedIdentifier; |
| 233 | 0 | } |
| 234 | |
|
| 235 | |
public void refresh() { |
| 236 | |
|
| 237 | 0 | } |
| 238 | |
|
| 239 | |
@Override |
| 240 | |
public void refreshNonUpdateableReferences() { |
| 241 | |
|
| 242 | 0 | } |
| 243 | |
@Override |
| 244 | |
public void refreshReferenceObject(String referenceObjectName) { |
| 245 | |
|
| 246 | 0 | } |
| 247 | |
|
| 248 | |
@Override |
| 249 | |
protected void prePersist() { |
| 250 | 0 | throw new UnsupportedOperationException( "This object should never be persisted."); |
| 251 | |
} |
| 252 | |
|
| 253 | |
@Override |
| 254 | |
protected void preUpdate() { |
| 255 | 0 | throw new UnsupportedOperationException( "This object should never be persisted."); |
| 256 | |
} |
| 257 | |
|
| 258 | |
@Override |
| 259 | |
protected void preRemove() { |
| 260 | 0 | throw new UnsupportedOperationException( "This object should never be persisted."); |
| 261 | |
} |
| 262 | |
|
| 263 | |
public DocumentTypeEBO getDocumentType() { |
| 264 | 0 | return this.documentType; |
| 265 | |
} |
| 266 | |
|
| 267 | |
public void setDocumentType(DocumentTypeEBO documentType) { |
| 268 | 0 | this.documentType = documentType; |
| 269 | 0 | } |
| 270 | |
} |