VR - The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public abstract class AbstractTransactionPolicy<VR> extends AbstractPolicy<VR>
IPolicy that is transactional.adaptableIAdaptable.Bound.Impl<T extends IAdaptable>| Constructor and Description |
|---|
AbstractTransactionPolicy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInitialized()
Checks whether this
AbstractTransactionPolicy is initialized and
throws an IllegalStateException if not. |
ITransactionalOperation |
commit()
Returns an
ITransactionalOperation that performs all
manipulations applied by the policy since the previous init()
call. |
protected abstract ITransactionalOperation |
createOperation()
Creates an
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods. |
protected ITransactionalOperation |
getOperation()
Returns the
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods. |
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
protected boolean |
isInitialized()
Returns whether this
AbstractTransactionPolicy is initialized or
not. |
protected void |
locallyExecuteOperation()
Locally executes the
ITransactionalOperation that is updated by
this policy, i.e. not on the operation history. |
void |
rollback()
Puts back this policy into an uninitialized state, reverting any changes
that have been applied via the policy's work methods since the preceding
init() call. |
adaptableProperty, getAdaptable, getHost, setAdaptableprotected void checkInitialized()
AbstractTransactionPolicy is initialized and
throws an IllegalStateException if not.public ITransactionalOperation commit()
ITransactionalOperation that performs all
manipulations applied by the policy since the previous init()
call.ITransactionalOperation that performs all
manipulations applied by the policy since the last
init() call.protected abstract ITransactionalOperation createOperation()
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods. The created operation should allow for
local execution at each time.ITransactionalOperation to encapsulate all applied
changes.protected final ITransactionalOperation getOperation()
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods.ITransactionalOperation to encapsulate all applied
changes.public void init()
IllegalStateException, as well as re-initializing before
committing or rolling back.protected boolean isInitialized()
AbstractTransactionPolicy is initialized or
not.true if this AbstractTransactionPolicy is
initialized, false otherwise.protected void locallyExecuteOperation()
ITransactionalOperation that is updated by
this policy, i.e. not on the operation history. Maybe used in the "work"
operations of subclasses.public void rollback()
init() call.Copyright (c) 2014 itemis AG and others. All rights reserved.