public class TransactionImpl extends Object implements Transaction
| Constructor and Description |
|---|
TransactionImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isRollbackOnError() |
boolean |
isRollbackOnly() |
void |
setRollbackOnError(boolean rollbackOnError)
Use this to request either "commit always" or "commit unless error" behavior.
|
void |
setRollbackOnly(boolean rollbackOnly)
If your code inside run() decides for some reason the transaction should rollback
rather than commit, use this method.
|
public boolean isRollbackOnError()
isRollbackOnError in interface TransactionThrowable
being thrown from the run method - this only reflects what was requested
by calling Transaction.setRollbackOnError(boolean), which is not necessarily
what will actually happenpublic void setRollbackOnError(boolean rollbackOnError)
TransactionTransaction.isRollbackOnly() returns true.setRollbackOnError in interface TransactionrollbackOnError - true to rollback after errors; false to commit or rollback based on
the other settingsDatabaseProvider.transact(DbCodeTx)public boolean isRollbackOnly()
isRollbackOnly in interface TransactionTransaction.setRollbackOnly(boolean),
which is not necessarily what will actually happenpublic void setRollbackOnly(boolean rollbackOnly)
TransactionIf your code inside run() decides for some reason the transaction should rollback rather than commit, use this method.
setRollbackOnly in interface TransactionrollbackOnly - true to request an unconditional rollback; false to commit or rollback based on
the other settingsDatabaseProvider.transact(DbCodeTx)Copyright © 2016. All rights reserved.