Class FHIRTestTransactionAdapter

  • All Implemented Interfaces:
    FHIRPersistenceTransaction

    public class FHIRTestTransactionAdapter
    extends java.lang.Object
    implements FHIRPersistenceTransaction
    Hides the logic behind obtaining a JDBC Connection from the DAO code. Use by unit tests or other scenarios where connections are obtained using an IConnectionProvider implementation, outside the scope of a JEE container. Transactions are managed with the help of the SimpleTransactionProvider and wrapped by this class, meaning we have a uniform interface for handling transactions across JEE and unit-test scenarios.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void begin()
      Begin a new transaction on the current thread if a transaction is not started yet.
      void end()
      End the current thread's transaction.
      boolean hasBegun()
      Determine if the transaction status is currently active
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait