Class FHIRUserTransactionAdapter

  • All Implemented Interfaces:
    FHIRPersistenceTransaction

    public class FHIRUserTransactionAdapter
    extends Object
    implements FHIRPersistenceTransaction
    Adapter to simplify transaction handling. This object is returned by FHIRPersistenceJDBCImpl and can be used instead of the old FHIRTransactionHelper
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void begin()
      If a transaction has not yet been started on this thread, then start one.
      void end()
      If we previously started a transaction on this thread using this helper instance, then commit it now.
      (package private) <T> T func​(Supplier<T> s)
      Call the supplier function within a begin/end
      protected int getStatus()
      Get the Status of the global transaction
      protected boolean isActive​(int status)
      Is there a transaction currently on this thread?
      protected boolean isMarkedForRollback​(int status)
      Has this transaction been marked for rollback?
      protected boolean isNoTransaction​(int status)
      Are we in the NO TRANSACTION state?
      boolean isTransactional()
      Does the underlying implementation actually support transactions? A persistence layer must always return a FHIRPersistenceTransaction even if it doesn't support transactions.
      void setRollbackOnly()
      Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.