Class BaseTransaction<T extends Transaction,R>

java.lang.Object
com.jbstrap.core.dao.BaseTransaction<T,R>
All Implemented Interfaces:
Transaction
Direct Known Subclasses:
SQLTransaction

public abstract class BaseTransaction<T extends Transaction,R> extends Object implements Transaction
  • Constructor Details

    • BaseTransaction

      public BaseTransaction()
  • Method Details

    • getTransactionObject

      public abstract R getTransactionObject()
      Specified by:
      getTransactionObject in interface Transaction
    • commit

      public abstract T commit() throws ConnectionException
      Commits the transaction towards the data store. Following this, no additional operation can be done in the transaction, and it cannot be rolled back.
      Specified by:
      commit in interface Transaction
      Returns:
      The transaction instance
      Throws:
      ConnectionException - If any error is encountered during the commit. In every case, the error most be packaged in this type of error.
    • rollBack

      public abstract T rollBack() throws ConnectionException
      Rolls back the current transaction. Following this, no additional operation can be done in the transaction, and it cannot be committed.
      Specified by:
      rollBack in interface Transaction
      Returns:
      The transaction instance
      Throws:
      ConnectionExceptionIf - any error is encountered during the commit. In every case, the error most be packaged in this type of error.
      ConnectionException