Class EntityTransactionImpl

java.lang.Object
cz.cvut.kbss.jopa.transactions.EntityTransactionImpl
All Implemented Interfaces:
EntityTransaction

public class EntityTransactionImpl extends Object implements EntityTransaction
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Start a resource transaction.
    void
    Commit the current resource transaction, writing any unflushed changes to the database.
    boolean
    Indicate whether a resource transaction is in progress.
    boolean
    Determine whether the current resource transaction has been marked for rollback.
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • begin

      public void begin()
      Description copied from interface: EntityTransaction
      Start a resource transaction.
      Specified by:
      begin in interface EntityTransaction
    • 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 interface EntityTransaction
    • rollback

      public void rollback()
      Description copied from interface: EntityTransaction
      Roll back the current resource transaction.
      Specified by:
      rollback in interface EntityTransaction
    • 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 interface EntityTransaction
    • isRollbackOnly

      public boolean isRollbackOnly()
      Description copied from interface: EntityTransaction
      Determine whether the current resource transaction has been marked for rollback.
      Specified by:
      isRollbackOnly in interface EntityTransaction
      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 interface EntityTransaction
      Returns:
      boolean indicating whether transaction is in progress