Class MCROCFLPersistenceTransaction

java.lang.Object
org.mycore.ocfl.MCROCFLPersistenceTransaction
All Implemented Interfaces:
MCRPersistenceTransaction

public class MCROCFLPersistenceTransaction extends Object implements MCRPersistenceTransaction
Author:
Tobias Lenhardt [Hammer1279], Thomas Scheffler (yagee)
  • Constructor Details

    • MCROCFLPersistenceTransaction

      public MCROCFLPersistenceTransaction()
  • Method Details

    • isReady

      public boolean isReady()
      Description copied from interface: MCRPersistenceTransaction
      preconditions in the backend are met and this instance should be used for transactions
      Specified by:
      isReady in interface MCRPersistenceTransaction
      Returns:
      true if this instance is ready for transaction handling, e.g. underlaying database is configured
    • begin

      public void begin()
      Description copied from interface: MCRPersistenceTransaction
      Start a transaction.
      Specified by:
      begin in interface MCRPersistenceTransaction
    • commit

      public void commit()
      Description copied from interface: MCRPersistenceTransaction
      Commit the current transaction, writing any unflushed changes to the backend.
      Specified by:
      commit in interface MCRPersistenceTransaction
    • rollback

      public void rollback()
      Description copied from interface: MCRPersistenceTransaction
      Roll back the current transaction.
      Specified by:
      rollback in interface MCRPersistenceTransaction
    • getRollbackOnly

      public boolean getRollbackOnly()
      Description copied from interface: MCRPersistenceTransaction
      Determine whether the current transaction has been marked for rollback.
      Specified by:
      getRollbackOnly in interface MCRPersistenceTransaction
      Returns:
      boolean indicating whether the transaction has been marked for rollback
    • isActive

      public boolean isActive()
      Description copied from interface: MCRPersistenceTransaction
      Indicate whether a transaction is in progress.
      Specified by:
      isActive in interface MCRPersistenceTransaction
      Returns:
      boolean indicating whether transaction is in progress
    • addClassficationEvent

      public static void addClassficationEvent(MCRCategoryID id, char type)
      Add Classifications to get Updated/Deleted once the Transaction gets Committed
      Parameters:
      id - The ID of the Classification
      type - 'A' for created, 'M' for modified, 'D' deleted