public class SetRollbackTransaction extends Object implements javax.persistence.EntityTransaction
| Constructor and Description |
|---|
SetRollbackTransaction(javax.persistence.EntityTransaction entityTransaction)
Create SetRollbackTransaction object
|
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Ignore any call to start the resource transaction.
|
void |
commit()
Ignore any call to commit the current transaction
|
boolean |
getRollbackOnly()
Determine whether the current transaction has been marked
for rollback.
|
boolean |
isActive()
Indicate whether a transaction is in progress.
|
void |
rollback()
Ignore any call to roll back the current transaction
|
void |
setRollbackOnly()
Mark the current transaction so that the only possible
outcome of the transaction is for the transaction to be
rolled back.
|
public SetRollbackTransaction(javax.persistence.EntityTransaction entityTransaction)
entityTransaction - Wrapped transactionpublic void begin()
begin in interface javax.persistence.EntityTransactionpublic void commit()
commit in interface javax.persistence.EntityTransactionpublic boolean getRollbackOnly()
getRollbackOnly in interface javax.persistence.EntityTransactionIllegalStateException - if isActive() is false.public boolean isActive()
isActive in interface javax.persistence.EntityTransactionjavax.persistence.PersistenceException - if an unexpected error condition is encountered.public void rollback()
rollback in interface javax.persistence.EntityTransactionpublic void setRollbackOnly()
setRollbackOnly in interface javax.persistence.EntityTransactionIllegalStateException - if isActive() is false.This documentation is licensed by Andrew Bowley under the GPLv3 License.