|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
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 |
public void insert(Entity entity, TreeOptionType treeOption) throws PersistenceException
If already an entity with equal key exists in persistence, an exception will be thrown.
entity
- Description of the ParametertreeOption
- Description of the Parameter
PersistenceException
public void update(Entity entity, TreeOptionType treeOption) throws PersistenceException
entity
- Description of the ParametertreeOption
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic void modify(Entity entity, TreeOptionType treeOption) throws PersistenceException
If no entity with equal key exists in persistent storage, an exception will be thrown.
entity
- Description of the ParametertreeOption
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic void insert(Entity[] entities, TreeOptionType treeOption) throws PersistenceException
If already an entity with equal key to one of those in the array exists in persistence, an exception will be thrown.
entities
- Description of the ParametertreeOption
- Description of the Parameter
PersistenceException
public void update(Entity[] entities, TreeOptionType treeOption) throws PersistenceException
entities
- Description of the ParametertreeOption
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic void modify(Entity[] entities, TreeOptionType treeOption) throws PersistenceException
If no entity with equal key to one of those in the array exists in persistence, an exception will be thrown.
entities
- Description of the ParametertreeOption
- Description of the Parameter
PersistenceException
public Entity get(java.lang.String entityKey, TreeOptionType tree) throws PersistenceException
The method throws an exception, if no entity is found with the given key.
entityKey
- Description of the Parametertree
- Description of the Parameter
PersistenceException
public Entity get(java.lang.String classtype, java.lang.String entityKey) throws PersistenceException
entityKey
- Description of the Parameterclasstype
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic boolean contains(java.lang.String entityKey) throws PersistenceException
entityKey
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic boolean contains(java.lang.String classtype, java.lang.String entityKey) throws PersistenceException
PersistenceException
public MeIterator get(java.lang.String[] entityKeys, TreeOptionType tree) throws PersistenceException
The method throws an exception, if no entity is found with a given key.
entityKeys
- Description of the Parametertree
- Description of the Parameter
PersistenceException
public MeIterator get(Query query, TreeOptionType tree) throws PersistenceException
query
- Description of the Parametertree
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic int getCount(Query query) throws PersistenceException
query
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic MeIterator getAll(java.lang.String classtype, TreeOptionType tree) throws PersistenceException
classtype
- Description of the Parametertree
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic void delete(Entity entity, TreeOptionType treeOption) throws PersistenceException
entity
- Description of the ParametertreeOption
- Description of the Parameter
PersistenceException
public void delete(java.lang.String key, TreeOptionType treeOption) throws PersistenceException
treeOption
- Description of the Parameterkey
- Description of the Parameter
PersistenceException
public void delete(java.lang.String[] key, TreeOptionType treeOption) throws PersistenceException
treeOption
- Description of the Parameterkey
- Description of the Parameter
PersistenceException
public void deleteAll(java.lang.String classtype, TreeOptionType treeOption) throws PersistenceException
classtype
- Description of the ParametertreeOption
- Description of the Parameter
PersistenceException
- Description of the Exceptionpublic Transaction getTransaction()
public Transaction begin(TransactionType transactionType) throws PersistenceException
transactionType
- Description of the Parameter
PersistenceException
public void registerEntityFactory(PackageEntityFactory factory)
factory
- Description of the Parameter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |