org.kuali.rice.krad.bo
Class PersistableBusinessObjectBase

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject
Direct Known Subclasses:
Address, ApplicationDocumentStatus, ApplicationDocumentStatusCategory, Attachment, AttachmentSample, AttributeReference, Author, Book, BookOrder, BookType, BSAddressType, CampusBo, CampusTypeBo, ComponentBo, CountryBo, CountyBo, DerivedComponentBo, DocumentBase, DocumentHeader, DocumentStatusTransition, DocumentType, DocumentTypePolicy, EDocLiteAssociation, EDocLiteDefinition, FiscalOfficer, GenericPermissionBo, GlobalBusinessObjectDetailBase, InactivatableFromToImpl, KimAttributeBo, KimDocumentBoBase, KualiCodeBase, MaintenanceLock, Message, MultiAttachmentSample, MultipleValueLookupMetadata, NamespaceBo, Note, NoteType, NotificationBo, NotificationChannelBo, NotificationChannelReviewerBo, NotificationContentTypeBo, NotificationMessageDelivery, NotificationPriorityBo, NotificationProducerBo, NotificationRecipientBo, NotificationRecipientListBo, NotificationSenderBo, ParameterBo, ParameterTypeBo, PermissionBo, PersistableAttachmentBase, PersistableBusinessObjectExtensionBase, PessimisticLock, PostalCodeBo, ReviewResponsibilityBo, RouteNodeConfigParam, RuleAttribute, RuleBaseValues, RuleDelegationBo, RuleExpressionDef, RuleResponsibilityBo, RuleTemplateAttributeBo, RuleTemplateBo, SessionDocument, State, StateBo, StyleBo, TemplateBo, TravelAccount, TravelAccountType, UberResponsibilityBo, UserChannelSubscriptionBo

Deprecated. use new KRAD Data framework DataObjectService. In this framework, data objects are not required to have a superclass and can be POJO's but they can optionally use DataObjectBase to emulate previous functionality.

@Deprecated
@MappedSuperclass
public abstract class PersistableBusinessObjectBase
extends BusinessObjectBase
implements PersistableBusinessObject, org.apache.ojb.broker.PersistenceBrokerAware, Versioned, GloballyUnique

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

Field Summary
protected  PersistableBusinessObjectExtension extension
          Deprecated.  
protected  boolean newCollectionRecord
          Deprecated.  
protected  String objectId
          Deprecated.  
protected  Long versionNumber
          Deprecated.  
 
Constructor Summary
PersistableBusinessObjectBase()
          Deprecated.  
 
Method Summary
 void afterDelete(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
          Deprecated. Implementation of the OJB afterDelete hook which delegates to postRemove().
 void afterInsert(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
          Deprecated. Implementation of the OJB afterInsert hook which delegates to postPersist().
 void afterLookup(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
          Deprecated. Implementation of the OJB afterLookup hook which delegates to postLoad().
 void afterUpdate(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
          Deprecated. Implementation of the OJB afterUpdate hook which delegates to postUpdate().
 void beforeDelete(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
          Deprecated. Implementation of the OJB beforeDelete hook which delegates to preRemove().
 void beforeInsert(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
          Deprecated. Implementation of the OJB beforeInsert hook which delegates to prePersist().
 void beforeUpdate(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
          Deprecated. Implementation of the OJB beforeUpdate hook which delegates to preUpdate().
 List<Collection<PersistableBusinessObject>> buildListOfDeletionAwareLists()
          Deprecated. If this method is not implemented appropriately for PersistableBusinessObject with collections, then PersistableBusinessObject with collections will not persist deletions correctly.
 PersistableBusinessObjectExtension getExtension()
          Deprecated.  
protected static LegacyAppFrameworkAdapterService getLegacyDataAdapter()
          Deprecated. application code should never use this! Always use KRAD code directly.
 String getObjectId()
          Deprecated. Return the globally unique object id of this object.
 Long getVersionNumber()
          Deprecated. Returns the version number for this object.
 boolean isNewCollectionRecord()
          Deprecated. Gets the newCollectionRecord attribute.
 void linkEditableUserFields()
          Deprecated. Hook to link in any editable user fields.
protected  void postLoad()
          Deprecated. Default implementation of the JPA PostLoad hook.
protected  void postPersist()
          Deprecated. Default implementation of the JPA PostPersist hook.
protected  void postRemove()
          Deprecated. Default implementation of the JPA PostRemove hook.
protected  void postUpdate()
          Deprecated. Default implementation of the JPA PostUpdate hook.
protected  void prePersist()
          Deprecated. Default implementation of the JPA PrePersist hook which generates the unique objectId for this persistable business object if it does not already have one.
protected  void preRemove()
          Deprecated. Default implementation of the JPA PreRemove hook.
protected  void preUpdate()
          Deprecated. Default implementation of the JPA PreUpdate hook which generates the unique objectId for this persistable business object if it does not already have one.
 void refresh()
          Deprecated. getService Refreshes the reference objects from the primitive values.
 void refreshNonUpdateableReferences()
          Deprecated.  
 void refreshReferenceObject(String referenceObjectName)
          Deprecated. This method is used to refresh a reference object that hangs off of a document.
 void setExtension(PersistableBusinessObjectExtension extension)
          Deprecated.  
 void setNewCollectionRecord(boolean isNewCollectionRecord)
          Deprecated. Sets the newCollectionRecord attribute value.
 void setObjectId(String objectId)
          Deprecated. Sets the unique identifier for the object
 void setVersionNumber(Long versionNumber)
          Deprecated. Sets the business object's version number.
 
Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
 

Field Detail

versionNumber

protected Long versionNumber
Deprecated. 

objectId

protected String objectId
Deprecated. 

newCollectionRecord

protected boolean newCollectionRecord
Deprecated. 

extension

protected PersistableBusinessObjectExtension extension
Deprecated. 
Constructor Detail

PersistableBusinessObjectBase

public PersistableBusinessObjectBase()
Deprecated. 
Method Detail

getVersionNumber

public Long getVersionNumber()
Deprecated. 
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

setVersionNumber

public void setVersionNumber(Long versionNumber)
Deprecated. 
Description copied from interface: PersistableBusinessObject
Sets the business object's version number. It is rarely advisable for client code to manually set this value as the framework should generally handle the management of version numbers internally.

Specified by:
setVersionNumber in interface PersistableBusinessObject
Parameters:
versionNumber - the version number to set on this business object

getObjectId

public String getObjectId()
Deprecated. 
Description copied from interface: GloballyUnique
Return the globally unique object id of this object. In general, this value should only be null if the object has not yet been stored to a persistent data store.

Specified by:
getObjectId in interface GloballyUnique
Returns:
the objectId of this object, or null if it has not been set yet

setObjectId

public void setObjectId(String objectId)
Deprecated. 
Description copied from interface: PersistableBusinessObject
Sets the unique identifier for the object

Specified by:
setObjectId in interface PersistableBusinessObject

isNewCollectionRecord

public boolean isNewCollectionRecord()
Deprecated. 
Gets the newCollectionRecord attribute.

Specified by:
isNewCollectionRecord in interface PersistableBusinessObject
Returns:
Returns the newCollectionRecord.

setNewCollectionRecord

public void setNewCollectionRecord(boolean isNewCollectionRecord)
Deprecated. 
Sets the newCollectionRecord attribute value.

Specified by:
setNewCollectionRecord in interface PersistableBusinessObject
Parameters:
isNewCollectionRecord - The newCollectionRecord to set.

afterDelete

public final void afterDelete(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                       throws org.apache.ojb.broker.PersistenceBrokerException
Deprecated. 
Implementation of the OJB afterDelete hook which delegates to postRemove(). This method is final because it is recommended that sub-classes override and implement postRemove if they need to take advantage of this persistence hook.

Specified by:
afterDelete in interface org.apache.ojb.broker.PersistenceBrokerAware
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistenceBrokerAware.afterDelete(org.apache.ojb.broker.PersistenceBroker)

postRemove

protected void postRemove()
Deprecated. 
Default implementation of the JPA PostRemove hook. This implementation currently does nothing, however sub-classes can override and implement this method if needed.

This method is currently invoked by the corresponding OJB afterDelete(PersistenceBroker) hook.


afterInsert

public final void afterInsert(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                       throws org.apache.ojb.broker.PersistenceBrokerException
Deprecated. 
Implementation of the OJB afterInsert hook which delegates to postPersist(). This method is final because it is recommended that sub-classes override and implement postPersist if they need to take advantage of this persistence hook.

Specified by:
afterInsert in interface org.apache.ojb.broker.PersistenceBrokerAware
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistenceBrokerAware.afterInsert(org.apache.ojb.broker.PersistenceBroker)

postPersist

protected void postPersist()
Deprecated. 
Default implementation of the JPA PostPersist hook. This implementation currently does nothing, however sub-classes can override and implement this method if needed.

This method is currently invoked by the corresponding OJB afterInsert(PersistenceBroker) hook.


afterLookup

public final void afterLookup(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                       throws org.apache.ojb.broker.PersistenceBrokerException
Deprecated. 
Implementation of the OJB afterLookup hook which delegates to postLoad(). This method is final because it is recommended that sub-classes override and implement postLoad if they need to take advantage of this persistence hook.

Specified by:
afterLookup in interface org.apache.ojb.broker.PersistenceBrokerAware
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistenceBrokerAware.afterLookup(org.apache.ojb.broker.PersistenceBroker)

postLoad

protected void postLoad()
Deprecated. 
Default implementation of the JPA PostLoad hook. This implementation currently does nothing, however sub-classes can override and implement this method if needed.

This method is currently invoked by the corresponding OJB afterLookup(PersistenceBroker) hook.


afterUpdate

public final void afterUpdate(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                       throws org.apache.ojb.broker.PersistenceBrokerException
Deprecated. 
Implementation of the OJB afterUpdate hook which delegates to postUpdate(). This method is final because it is recommended that sub-classes override and implement postUpdate if they need to take advantage of this persistence hook.

Specified by:
afterUpdate in interface org.apache.ojb.broker.PersistenceBrokerAware
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistenceBrokerAware.afterUpdate(org.apache.ojb.broker.PersistenceBroker)

postUpdate

protected void postUpdate()
Deprecated. 
Default implementation of the JPA PostUpdate hook. This implementation currently does nothing, however sub-classes can override and implement this method if needed.

This method is currently invoked by the corresponding OJB afterUpdate(PersistenceBroker) hook.


beforeDelete

public final void beforeDelete(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                        throws org.apache.ojb.broker.PersistenceBrokerException
Deprecated. 
Implementation of the OJB beforeDelete hook which delegates to preRemove(). This method is final because it is recommended that sub-classes override and implement preRemove if they need to take advantage of this persistence hook.

Specified by:
beforeDelete in interface org.apache.ojb.broker.PersistenceBrokerAware
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistenceBrokerAware.beforeDelete(org.apache.ojb.broker.PersistenceBroker)

preRemove

protected void preRemove()
Deprecated. 
Default implementation of the JPA PreRemove hook. This implementation currently does nothing, however sub-classes can implement this method if needed.

This method is currently invoked by the corresponding OJB beforeDelete(PersistenceBroker) hook.


beforeInsert

public final void beforeInsert(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                        throws org.apache.ojb.broker.PersistenceBrokerException
Deprecated. 
Implementation of the OJB beforeInsert hook which delegates to prePersist(). This method is final because it is recommended that sub-classes override and implement prePersist if they need to take advantage of this persistence hook.

Specified by:
beforeInsert in interface org.apache.ojb.broker.PersistenceBrokerAware
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistenceBrokerAware.beforeInsert(org.apache.ojb.broker.PersistenceBroker)

prePersist

protected void prePersist()
Deprecated. 
Default implementation of the JPA PrePersist hook which generates the unique objectId for this persistable business object if it does not already have one. Any sub-class which overrides this method should take care to invoke super.prePersist to ensure that the objectId for this persistable business object is generated properly.

This method is currently invoked by the corresponding OJB beforeInsert(PersistenceBroker) hook.


beforeUpdate

public final void beforeUpdate(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                        throws org.apache.ojb.broker.PersistenceBrokerException
Deprecated. 
Implementation of the OJB beforeUpdate hook which delegates to preUpdate(). This method is final because it is recommended that sub-classes override and implement preUpdate if they need to take advantage of this persistence hook.

Specified by:
beforeUpdate in interface org.apache.ojb.broker.PersistenceBrokerAware
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistenceBrokerAware.beforeUpdate(org.apache.ojb.broker.PersistenceBroker)

preUpdate

protected void preUpdate()
Deprecated. 
Default implementation of the JPA PreUpdate hook which generates the unique objectId for this persistable business object if it does not already have one. Any sub-class which overrides this method should take care to invoke super.preUpdate to ensure that the objectId for this persistable business object is generated properly.

This method is currently invoked by the corresponding OJB beforeUpdate(PersistenceBroker) hook.


refresh

public void refresh()
Deprecated. 
getService Refreshes the reference objects from the primitive values.

Specified by:
refresh in interface BusinessObject
See Also:
BusinessObject.refresh()

refreshNonUpdateableReferences

public void refreshNonUpdateableReferences()
Deprecated. 
Specified by:
refreshNonUpdateableReferences in interface PersistableBusinessObject
See Also:
BusinessObject.refresh()

refreshReferenceObject

public void refreshReferenceObject(String referenceObjectName)
Deprecated. 
Description copied from interface: PersistableBusinessObject
This method is used to refresh a reference object that hangs off of a document. For example, if the attribute's keys were updated for a reference object, but the reference object wasn't, this method would go out and retrieve the reference object.

Specified by:
refreshReferenceObject in interface PersistableBusinessObject

buildListOfDeletionAwareLists

public List<Collection<PersistableBusinessObject>> buildListOfDeletionAwareLists()
Deprecated. 
Description copied from interface: PersistableBusinessObject
If this method is not implemented appropriately for PersistableBusinessObject with collections, then PersistableBusinessObject with collections will not persist deletions correctly. Elements that have been deleted will reappear in the DB after retrieval.

Specified by:
buildListOfDeletionAwareLists in interface PersistableBusinessObject
Returns:
List of collections which need to be monitored for changes by OJB

linkEditableUserFields

public void linkEditableUserFields()
Deprecated. 
Description copied from interface: PersistableBusinessObject
Hook to link in any editable user fields.

Specified by:
linkEditableUserFields in interface PersistableBusinessObject

getExtension

public PersistableBusinessObjectExtension getExtension()
Deprecated. 
Specified by:
getExtension in interface PersistableBusinessObject

setExtension

public void setExtension(PersistableBusinessObjectExtension extension)
Deprecated. 
Specified by:
setExtension in interface PersistableBusinessObject

getLegacyDataAdapter

@Deprecated
protected static LegacyAppFrameworkAdapterService getLegacyDataAdapter()
Deprecated. application code should never use this! Always use KRAD code directly.

Returns the legacy data adapter for handling legacy KNS and KRAD data and metadata.

Returns:
the legacy data adapter


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.