public interface UserServiceTransaction
UserServiceTransactionManager.createTransaction()
Modifier and Type | Interface and Description |
---|---|
static class |
UserServiceTransaction.DeletedObjectOutcome
Enumeration for specifying the outcome of a transaction when the underlying data,
of the object being updated, was deleted by another thread.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ObjectKey anObjectKey)
Adds an object to be created or updated.
|
void |
add(ObjectKey anObjectKey,
UserServiceTransaction.DeletedObjectOutcome aDeletedObjectOutcome)
Adds an object to be created or updated.
|
void |
add(Procedure aProcedure)
Adds a procedure.
|
ProcedureResult |
execute()
In the same transaction, updates and creates objects and executes procedures
in the same order as they were previously added.
|
ProcedureResult |
execute(AdaptationHome aDataSpace)
In the same transaction, on a given dataspace, updates and creates objects
and executes procedures in the same order as they were previously added.
|
ProcedureResult |
execute(AdaptationHome aDataSpace,
boolean addErrorMessageIfException)
In the same transaction, on a given dataspace, updates and creates objects
and executes procedures in the same order as they were previously added.
|
ProcedureResult |
execute(boolean addErrorMessageIfException)
In the same transaction, updates and creates objects and executes
procedures in the same order as they were previously added.
|
void add(ObjectKey anObjectKey)
anObjectKey
- the object key. The object must be a record or a dataset.UserServiceException
- if:
UserServiceObjectContextBuilder.registerRecordOrDataSet(ObjectKey, Adaptation)
,
UserServiceObjectContextBuilder.registerNewRecord(ObjectKey, AdaptationTable)
void add(ObjectKey anObjectKey, UserServiceTransaction.DeletedObjectOutcome aDeletedObjectOutcome)
anObjectKey
- the object key. The object must be a record or a dataset.aDeletedObjectOutcome
- specifies the outcome when transaction is executed if the underlying data was
deleted by another thread. This parameter is ignored if object is a
record being created.UserServiceException
- if:
UserServiceObjectContextBuilder.registerRecordOrDataSet(ObjectKey, Adaptation)
,
UserServiceObjectContextBuilder.registerNewRecord(ObjectKey, AdaptationTable)
void add(Procedure aProcedure)
aProcedure
- the procedure.ProcedureResult execute()
Calling this method is similar to calling execute(true).
UserServiceException
- if objects are not all from the same dataspace.ProcedureResult execute(boolean addErrorMessageIfException)
The dataspace that will be used to execute the transaction is the one common to all added objects, or, if only procedures were added, the one from the current entity selection.
addErrorMessageIfException
- specifies whether the user interface automatically reports an error
message whenever the execution has encountered an error.UserServiceException
- if all objects are not from the same dataspace.DataspaceEntitySelection.getDataspace()
ProcedureResult execute(AdaptationHome aDataSpace)
Calling this method is similar to calling execute(aDataSpace, true).
aDataSpace
- the dataspace used when executing the transaction.UserServiceException
- if an object is not from the dataspace aDataSpace
.ProcedureResult execute(AdaptationHome aDataSpace, boolean addErrorMessageIfException)
aDataSpace
- the dataspace used when executing the transaction.addErrorMessageIfException
- specifies if the user interface automatically reports an error message
whenever the execution has encountered an error.UserServiceException
- if an object is not from the dataspace aDataSpace
.