com.sap.ip.me.api.persist.core
Interface TransactionManager


Deprecated. Use PersistenceManager for Persistence access instead

public interface TransactionManager

Factory for transactions and provider for transactional services, such as object lifecycle management.

Each persistence environment has to provide an implementation of interface TransactionManager.

The implementation must map the calls and Exceptions defined in this interface to the persistence tools implementation of a transaction manager. This is most likely done via delegation.

We currently distinguish two kinds of transactions: read-only ("read") and read/write ("write") transactions. Their implementation depends on the "persistence solution".

Only one transaction at a time may be opened. It is mandantory to create a transaction before any data-access, even read access

All persistent operations need to be specified with a TreeOptionType. It may have following values: SKELETON: only the entity itself is written

DEPENDENT: the entity itself and dependent associated entities are written

COMPLETE_TREE: the entity itself and all associated entities are written

Author:
SAP

Method Summary
 Transaction begin(TransactionType transactionType)
          Deprecated. begins a new transaction that fulfills the given transactional requirements and returns this transaction.
 boolean contains(java.lang.String entityKey)
          Deprecated.  
 boolean contains(java.lang.String classtype, java.lang.String entityKey)
          Deprecated.  
 void delete(Entity entity, TreeOptionType treeOption)
          Deprecated. deletes the given entity and dependent of the parameter treeOption the associated entities.
 void delete(java.lang.String[] key, TreeOptionType treeOption)
          Deprecated.  
 void delete(java.lang.String key, TreeOptionType treeOption)
          Deprecated.  
 void deleteAll(java.lang.String classtype, TreeOptionType treeOption)
          Deprecated. Deletes all entities for a classtype.
 MeIterator get(Query query, TreeOptionType tree)
          Deprecated. returns all entities for the query
 MeIterator get(java.lang.String[] entityKeys, TreeOptionType tree)
          Deprecated.  
 Entity get(java.lang.String classtype, java.lang.String entityKey)
          Deprecated. Description of the Method
 Entity get(java.lang.String entityKey, TreeOptionType tree)
          Deprecated. Use get(String type, String key)
 MeIterator getAll(java.lang.String classtype, TreeOptionType tree)
          Deprecated. returns all entities for the classtype
 int getCount(Query query)
          Deprecated. Gets the count attribute of the TransactionManager object
 Transaction getTransaction()
          Deprecated. returns the current transaction of the transaction manger.
 void insert(Entity[] entities, TreeOptionType treeOption)
          Deprecated. Inserts an array of entity instances, and all belonging instances, depending on TreeOptionType and Entity dependencies.
 void insert(Entity entity, TreeOptionType treeOption)
          Deprecated. Inserts an entity instance, and all belonging instances, depending on TreeOptionType and Entity dependencies.
 void modify(Entity[] entities, TreeOptionType treeOption)
          Deprecated. Modifies an array of entity instances, and all belonging instances, depending on TreeOptionType and Entity dependencies.
 void modify(Entity entity, TreeOptionType treeOption)
          Deprecated. Modifies an entity instance, and all belonging instances, depending on TreeOptionType and Entity dependencies.
 void registerEntityFactory(PackageEntityFactory factory)
          Deprecated. Description of the Method
 void update(Entity[] entities, TreeOptionType treeOption)
          Deprecated. Inserts or modifies an array of entity instances, and all belonging instances, depending on TreeOptionType and Entity dependencies.
 void update(Entity entity, TreeOptionType treeOption)
          Deprecated. Inserts or modifies an entity instance, and all belonging instances, depending on TreeOptionType and Entity dependencies.
 

Method Detail

insert

public void insert(Entity entity,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated. 
Inserts an entity instance, and all belonging instances, depending on TreeOptionType and Entity dependencies.

If already an entity with equal key exists in persistence, an exception will be thrown.

Parameters:
entity - Description of the Parameter
treeOption - Description of the Parameter
Throws:
PersistenceException

update

public void update(Entity entity,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated. 
Inserts or modifies an entity instance, and all belonging instances, depending on TreeOptionType and Entity dependencies.

Parameters:
entity - Description of the Parameter
treeOption - Description of the Parameter
Throws:
PersistenceException - Description of the Exception

modify

public void modify(Entity entity,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated. 
Modifies an entity instance, and all belonging instances, depending on TreeOptionType and Entity dependencies.

If no entity with equal key exists in persistent storage, an exception will be thrown.

Parameters:
entity - Description of the Parameter
treeOption - Description of the Parameter
Throws:
PersistenceException - Description of the Exception

insert

public void insert(Entity[] entities,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated. 
Inserts an array of entity instances, and all belonging instances, depending on TreeOptionType and Entity dependencies.

If already an entity with equal key to one of those in the array exists in persistence, an exception will be thrown.

Parameters:
entities - Description of the Parameter
treeOption - Description of the Parameter
Throws:
PersistenceException

update

public void update(Entity[] entities,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated. 
Inserts or modifies an array of entity instances, and all belonging instances, depending on TreeOptionType and Entity dependencies.

Parameters:
entities - Description of the Parameter
treeOption - Description of the Parameter
Throws:
PersistenceException - Description of the Exception

modify

public void modify(Entity[] entities,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated. 
Modifies an array of entity instances, and all belonging instances, depending on TreeOptionType and Entity dependencies.

If no entity with equal key to one of those in the array exists in persistence, an exception will be thrown.

Parameters:
entities - Description of the Parameter
treeOption - Description of the Parameter
Throws:
PersistenceException

get

public Entity get(java.lang.String entityKey,
                  TreeOptionType tree)
           throws PersistenceException
Deprecated. Use get(String type, String key)

restores the entity with the given entityKey together with the complete object tree of entities.

The method throws an exception, if no entity is found with the given key.

Parameters:
entityKey - Description of the Parameter
tree - Description of the Parameter
Returns:
The entity value
Throws:
PersistenceException

get

public Entity get(java.lang.String classtype,
                  java.lang.String entityKey)
           throws PersistenceException
Deprecated. 
Description of the Method

Parameters:
entityKey - Description of the Parameter
classtype - Description of the Parameter
Returns:
Description of the Return Value
Throws:
PersistenceException - Description of the Exception

contains

public boolean contains(java.lang.String entityKey)
                 throws PersistenceException
Deprecated.  

This method returns true if an entity for the specified entity-key exists, or false if not

Parameters:
entityKey - Description of the Parameter
Returns:
Description of the Return Value
Throws:
PersistenceException - Description of the Exception

contains

public boolean contains(java.lang.String classtype,
                        java.lang.String entityKey)
                 throws PersistenceException
Deprecated. 
Throws:
PersistenceException

get

public MeIterator get(java.lang.String[] entityKeys,
                      TreeOptionType tree)
               throws PersistenceException
Deprecated.  

returns the entities with the given entityKeys.

The method throws an exception, if no entity is found with a given key.

Parameters:
entityKeys - Description of the Parameter
tree - Description of the Parameter
Returns:
The entities value
Throws:
PersistenceException

get

public MeIterator get(Query query,
                      TreeOptionType tree)
               throws PersistenceException
Deprecated. 
returns all entities for the query

Parameters:
query - Description of the Parameter
tree - Description of the Parameter
Returns:
Description of the Return Value
Throws:
PersistenceException - Description of the Exception

getCount

public int getCount(Query query)
             throws PersistenceException
Deprecated. 
Gets the count attribute of the TransactionManager object

Parameters:
query - Description of the Parameter
Returns:
The count value
Throws:
PersistenceException - Description of the Exception

getAll

public MeIterator getAll(java.lang.String classtype,
                         TreeOptionType tree)
                  throws PersistenceException
Deprecated. 
returns all entities for the classtype

Parameters:
classtype - Description of the Parameter
tree - Description of the Parameter
Returns:
The all value
Throws:
PersistenceException - Description of the Exception

delete

public void delete(Entity entity,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated. 
deletes the given entity and dependent of the parameter treeOption the associated entities.

Parameters:
entity - Description of the Parameter
treeOption - Description of the Parameter
Throws:
PersistenceException

delete

public void delete(java.lang.String key,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated.  

deletes the given entity and dependent of the parameter treeOption the associated entities.

Parameters:
treeOption - Description of the Parameter
key - Description of the Parameter
Throws:
PersistenceException

delete

public void delete(java.lang.String[] key,
                   TreeOptionType treeOption)
            throws PersistenceException
Deprecated.  

deletes the given entities and dependent of the parameter treeOption the associated entities.

Parameters:
treeOption - Description of the Parameter
key - Description of the Parameter
Throws:
PersistenceException

deleteAll

public void deleteAll(java.lang.String classtype,
                      TreeOptionType treeOption)
               throws PersistenceException
Deprecated. 
Deletes all entities for a classtype.

Parameters:
classtype - Description of the Parameter
treeOption - Description of the Parameter
Throws:
PersistenceException - Description of the Exception

getTransaction

public Transaction getTransaction()
Deprecated. 
returns the current transaction of the transaction manger.

Returns:
The transaction value

begin

public Transaction begin(TransactionType transactionType)
                  throws PersistenceException
Deprecated. 
begins a new transaction that fulfills the given transactional requirements and returns this transaction.

Parameters:
transactionType - Description of the Parameter
Returns:
Description of the Return Value
Throws:
PersistenceException

registerEntityFactory

public void registerEntityFactory(PackageEntityFactory factory)
Deprecated. 
Description of the Method

Parameters:
factory - Description of the Parameter


Copyright © 2005 SAP AG. All Rights Reserved.