Package cz.cvut.kbss.jopa.transactions
Class EntityTransactionImpl
java.lang.Object
cz.cvut.kbss.jopa.transactions.EntityTransactionImpl
- All Implemented Interfaces:
EntityTransaction
-
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
Start a resource transaction.void
commit()
Commit the current resource transaction, writing any unflushed changes to the database.boolean
isActive()
Indicate whether a resource transaction is in progress.boolean
Determine whether the current resource transaction has been marked for rollback.void
rollback()
Roll back the current resource transaction.void
Mark the current resource transaction so that the only possible outcome of the transaction is for the transaction to be rolled back.
-
Method Details
-
begin
public void begin()Description copied from interface:EntityTransaction
Start a resource transaction.- Specified by:
begin
in interfaceEntityTransaction
-
commit
public void commit()Description copied from interface:EntityTransaction
Commit the current resource transaction, writing any unflushed changes to the database.- Specified by:
commit
in interfaceEntityTransaction
-
rollback
public void rollback()Description copied from interface:EntityTransaction
Roll back the current resource transaction.- Specified by:
rollback
in interfaceEntityTransaction
-
setRollbackOnly
public void setRollbackOnly()Description copied from interface:EntityTransaction
Mark the current resource transaction so that the only possible outcome of the transaction is for the transaction to be rolled back.- Specified by:
setRollbackOnly
in interfaceEntityTransaction
-
isRollbackOnly
public boolean isRollbackOnly()Description copied from interface:EntityTransaction
Determine whether the current resource transaction has been marked for rollback.- Specified by:
isRollbackOnly
in interfaceEntityTransaction
- Returns:
- boolean indicating whether the transaction has been marked for rollback
-
isActive
public boolean isActive()Description copied from interface:EntityTransaction
Indicate whether a resource transaction is in progress.- Specified by:
isActive
in interfaceEntityTransaction
- Returns:
- boolean indicating whether transaction is in progress
-