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


Deprecated. Entity is replaced by PersistableEntity

public interface Entity

Each class which shall be persistet needs to implement Entity.

When being read from persistent storage, the implementing class will be created by a PackageEntityFactory implementing instance.

Each entity has one Classtype - the classtype is linked to a ClassDescriptor which describes how an Entity is persistently read and written. The classtype may be linked as n:m to a specific java class, ; this means that instances of different classes may be treated uniquely for persistence as well as instances of the same class may be treated differently for persistence.

It must be ensured by the entity implementing class that once the instance is persisted, the unique entity key must never change. Therefore, the key should be held internally as a final attribute. The key is specified via method getEntityKey().

Author:
SAP
See Also:
PackageEntityFactory, com.sap.ip.me.api.persist.ent.ClassDescriptor

Method Summary
 java.lang.String getClasstype()
          Deprecated. Gets the classtype attribute of the Entity object.
 java.lang.String getEntityKey()
          Deprecated. Gets the unique entityKey attribute of the Entity object.
 void getInstance(PersistedObject persistedObject)
          Deprecated. Is called to get all attribute / links of the Entity instance.
 void setInstance(PersistedObject persistedObject)
          Deprecated. Is called to set all attribute / links of the Entity instance.
 

Method Detail

getEntityKey

public java.lang.String getEntityKey()
Deprecated. 
Gets the unique entityKey attribute of the Entity object. It must be ensured by the entity implementing class that once the instance is persisted, the unique entity key must never change. Therefore, the key should be held internally as a final attribute.

Returns:
The entityKey value

getClasstype

public java.lang.String getClasstype()
Deprecated. 
Gets the classtype attribute of the Entity object. Classtype is linked to a ClassDescriptor which describes how an Entity is persistently read and written. The classtype may be linked as n:m to a specific java class; this means that instances of different classes may be treated uniquely for persistence as well as instances of the same class may be treated differently for persistence.

Returns:
The classtype value
See Also:
com.sap.ip.me.api.persist.ent.ClassDescriptor

setInstance

public void setInstance(PersistedObject persistedObject)
                 throws PersistenceException
Deprecated. 
Is called to set all attribute / links of the Entity instance. This method is either called after creating the Entity instance from persistence or to restore a previous Entity state from persistence (rollback).

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

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

getInstance

public void getInstance(PersistedObject persistedObject)
                 throws PersistenceException
Deprecated. 
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.

Parameters:
persistedObject - Description of the Parameter
Throws:
EntityPersistenceException - Description of the Exception
PersistenceException
See Also:
com.sap.ip.me.api.persist.ent.PersistedObject


Copyright © 2005 SAP AG. All Rights Reserved.