public interface Transaction
| 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.
|
boolean isRollbackOnError()
Throwable
being thrown from the run method - this only reflects what was requested
by calling setRollbackOnError(boolean), which is not necessarily
what will actually happenvoid setRollbackOnError(boolean rollbackOnError)
isRollbackOnly() returns true.rollbackOnError - true to rollback after errors; false to commit or rollback based on
the other settingsDatabaseProvider.transact(DbCodeTx)boolean isRollbackOnly()
setRollbackOnly(boolean),
which is not necessarily what will actually happenvoid setRollbackOnly(boolean rollbackOnly)
If your code inside run() decides for some reason the transaction should rollback rather than commit, use this method.
rollbackOnly - true to request an unconditional rollback; false to commit or rollback based on
the other settingsDatabaseProvider.transact(DbCodeTx)Copyright © 2020. All rights reserved.