org.kuali.rice.kew.rule
Class RuleDelegation

java.lang.Object
  extended by org.kuali.rice.kns.bo.BusinessObjectBase
      extended by org.kuali.rice.kns.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.kew.bo.KewPersistableBusinessObjectBase
              extended by org.kuali.rice.kew.rule.RuleDelegation
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, BusinessObject, PersistableBusinessObject

@Sequence(name="KREW_RTE_TMPL_S",
          property="ruleDelegationId")
public class RuleDelegation
extends KewPersistableBusinessObjectBase

A model bean representing the delegation of a rule from a responsibility to another rule. Specifies the delegation type which can be either KEWConstants.DELEGATION_PRIMARY or KEWConstants.DELEGATION_SECONDARY.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
private  Long delegateRuleId
           
private  RuleBaseValues delegationRuleBaseValues
           
private  String delegationType
           
private  Long responsibilityId
           
private  Long ruleDelegationId
           
private static long serialVersionUID
           
 
Fields inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
RuleDelegation()
           
 
Method Summary
 Object copy(boolean preserveKeys)
           
 Long getDelegateRuleId()
           
 RuleBaseValues getDelegationRuleBaseValues()
           
 String getDelegationType()
           
 DocumentType getDocumentType()
           
 Long getResponsibilityId()
           
 Long getRuleDelegationId()
           
 RuleResponsibility getRuleResponsibility()
          Returns the most recent RuleResponsibility for the responsibility id on this RuleDelegation.
 void refresh()
          An override of the refresh() method that properly preserves the RuleBaseValues instance.
 void setDelegateRuleId(Long delegateRuleId)
           
 void setDelegationRuleBaseValues(RuleBaseValues delegationRuleBaseValues)
           
 void setDelegationType(String delegationType)
           
 void setResponsibilityId(Long ruleResponsibilityId)
           
 void setRuleDelegationId(Long ruleDelegationId)
           
protected  LinkedHashMap toStringMapper()
           
 
Methods inherited from class org.kuali.rice.kew.bo.KewPersistableBusinessObjectBase
beforeInsert
 
Methods inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
addNote, afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, beforeUpdate, buildListOfDeletionAwareLists, deleteNote, getAttachmentService, getBoNote, getBoNotes, getExtension, getNoteService, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isAutoIncrementSet, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, refreshReferenceObject, setAutoIncrementSet, setBoNotes, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber, supportsBoNotes
 
Methods inherited from class org.kuali.rice.kns.bo.BusinessObjectBase
prepareForWorkflow, toString, toStringBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kns.bo.BusinessObject
prepareForWorkflow
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

ruleDelegationId

private Long ruleDelegationId

responsibilityId

private Long responsibilityId

delegateRuleId

private Long delegateRuleId

delegationType

private String delegationType

delegationRuleBaseValues

private RuleBaseValues delegationRuleBaseValues
Constructor Detail

RuleDelegation

public RuleDelegation()
Method Detail

copy

public Object copy(boolean preserveKeys)

getDelegateRuleId

public Long getDelegateRuleId()

setDelegateRuleId

public void setDelegateRuleId(Long delegateRuleId)

getDelegationRuleBaseValues

public RuleBaseValues getDelegationRuleBaseValues()

setDelegationRuleBaseValues

public void setDelegationRuleBaseValues(RuleBaseValues delegationRuleBaseValues)

getDelegationType

public String getDelegationType()

setDelegationType

public void setDelegationType(String delegationType)

getRuleDelegationId

public Long getRuleDelegationId()

setRuleDelegationId

public void setRuleDelegationId(Long ruleDelegationId)

getRuleResponsibility

public RuleResponsibility getRuleResponsibility()
Returns the most recent RuleResponsibility for the responsibility id on this RuleDelegation.


getDocumentType

public DocumentType getDocumentType()

getResponsibilityId

public Long getResponsibilityId()

setResponsibilityId

public void setResponsibilityId(Long ruleResponsibilityId)

toStringMapper

protected LinkedHashMap toStringMapper()
Specified by:
toStringMapper in class BusinessObjectBase
Returns:
Map containing the fieldValues of the key fields for this class, indexed by fieldName

refresh

public void refresh()
An override of the refresh() method that properly preserves the RuleBaseValues instance. If the delegationRuleBaseValues property becomes null as a result of the refresh() method on the PersistableBusinessObjectBase superclass, an attempt is made to retrieve it by calling refreshReferenceObject() for the property. If that also fails, then the RuleBaseValues instance that was in-place prior to the refresh() superclass call will be used as the delegationRuleBaseValues property's value. This override is necessary in order to prevent certain exceptions during the cancellation of a rule delegation maintenance document.

Specified by:
refresh in interface BusinessObject
Overrides:
refresh in class PersistableBusinessObjectBase
See Also:
PersistableBusinessObjectBase.refresh(), PersistableBusinessObjectBase.refreshReferenceObject(java.lang.String)


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.