com.sap.ip.me.api.persist.app
Interface PersistableEntity


public interface PersistableEntity

PersistableEntity interface replaces Entity. The difference to Entity is that this interface requires the Entity to hold the PersistedObject through the whole lifetime of Entity. Therefore, the PersistedObject instance must be assigned at creation of the Entity instance which is the responsibility of EntityFactory. Whenever a change is invoked on the Entity by calling corresponding TransactionManager methods, e.g TransactionManager.insert() or TransactionManager.modify(), method PersistableEntity.getPersistedObject() is called to obtain changed attributes / references. The lifetime of Entity may either end by normal finalization or by active deletion / replacement in the persistence. Active deletion means that TransactionManager.delete() is called for an Entity instance. Replacement means, that TransactionManager.modify() is called with an Entity instance that has an equal key but is not identical. In these cases of "actor" triggered end of lifetime, method transitionToTransient() is called to indicate to the Entity that it is removed from persistence.

Author:
_
See Also:
EntityFactory, com.sap.ip.me.api.persist.ent.ClassDescriptor

Method Summary
 PersistenceContainer getPersistedObject()
          Is called to get all attribute / links of the Entity instance.
 

Method Detail

getPersistedObject

public PersistenceContainer getPersistedObject()
Is called to get all attribute / links of the Entity instance. This method is either called to provide the state of Entity to persistence for any kind of writing action.

The PersistedObject instance serves as a data container transporting data from the Entity instance to persistence.

Returns:
The persistedObject value
Throws:
PersistenceException - Description of the Exception
See Also:
com.sap.ip.me.api.persist.ent.PersistedObject


Copyright © 2003 SAP AG. All Rights Reserved.