public class DDBSTransaction extends java.lang.Object implements java.io.Serializable, UpdatableEntityManager
Modifier and Type | Field and Description |
---|---|
protected DistributableEntityManager |
distributableEntityManager
Distributable Entity manager
|
protected java.util.List<TransactionCommand> |
transactionCommands
List of transaction commands
|
protected java.lang.String |
transactionId
Transaction Id
|
Constructor and Description |
---|
DDBSTransaction(java.lang.String transactionId)
Transaction
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(IEntity objectToAdd)
Add an element to a data source
|
void |
commit()
Commit a transaction
|
boolean |
createEntity(IEntity objectToCreate)
Create the structure of the entity
|
boolean |
delete(IEntity objectToDelete)
Delete an object in a data source
|
java.util.List<TransactionCommand> |
getTransactionCommands()
Get list of transaction commands
|
java.lang.String |
getTransactionId()
Get transaction Id
|
void |
rollback()
Rollback the transaction
|
void |
setDistributableEntityManager(DistributableEntityManager distributableEntityManager)
Set entity manager
|
boolean |
update(IEntity objectToUpdate)
Update an element in a data source
|
protected java.lang.String transactionId
protected java.util.List<TransactionCommand> transactionCommands
protected DistributableEntityManager distributableEntityManager
public DDBSTransaction(java.lang.String transactionId)
transactionId
- Transaction Idpublic java.lang.String getTransactionId()
public java.util.List<TransactionCommand> getTransactionCommands()
public void setDistributableEntityManager(DistributableEntityManager distributableEntityManager)
distributableEntityManager
- Distributed Entity Managerpublic boolean add(IEntity objectToAdd) throws DDBSToolkitException
UpdatableEntityManager
add
in interface UpdatableEntityManager
objectToAdd
- Object to add in a data sourceDDBSToolkitException
- Problem during operationpublic boolean update(IEntity objectToUpdate) throws DDBSToolkitException
UpdatableEntityManager
update
in interface UpdatableEntityManager
objectToUpdate
- Object to updateDDBSToolkitException
- Problem during operationpublic boolean delete(IEntity objectToDelete) throws DDBSToolkitException
UpdatableEntityManager
delete
in interface UpdatableEntityManager
objectToDelete
- Object to deleteDDBSToolkitException
- Problem during operationpublic boolean createEntity(IEntity objectToCreate) throws DDBSToolkitException
UpdatableEntityManager
createEntity
in interface UpdatableEntityManager
objectToCreate
- Object to createDDBSToolkitException
- Problem during operationpublic void commit() throws DDBSToolkitException
DDBSToolkitException
- : Error to commit the transactionpublic void rollback() throws DDBSToolkitException
DDBSToolkitException
- : Error to rollback the connection