Class FHIRTestTransactionAdapter
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.connection.FHIRTestTransactionAdapter
-
- All Implemented Interfaces:
com.ibm.fhir.persistence.FHIRPersistenceTransaction
public class FHIRTestTransactionAdapter extends Object implements com.ibm.fhir.persistence.FHIRPersistenceTransaction
Hides the logic behind obtaining a JDBCConnectionfrom 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.
-
-
Constructor Summary
Constructors Constructor Description FHIRTestTransactionAdapter(com.ibm.fhir.database.utils.api.IConnectionProvider cp)Public constructor
-
-
-
Method Detail
-
begin
public void begin() throws com.ibm.fhir.persistence.exception.FHIRPersistenceException- Specified by:
beginin interfacecom.ibm.fhir.persistence.FHIRPersistenceTransaction- Throws:
com.ibm.fhir.persistence.exception.FHIRPersistenceException
-
end
public void end() throws com.ibm.fhir.persistence.exception.FHIRPersistenceException- Specified by:
endin interfacecom.ibm.fhir.persistence.FHIRPersistenceTransaction- Throws:
com.ibm.fhir.persistence.exception.FHIRPersistenceException
-
setRollbackOnly
public void setRollbackOnly() throws com.ibm.fhir.persistence.exception.FHIRPersistenceException- Specified by:
setRollbackOnlyin interfacecom.ibm.fhir.persistence.FHIRPersistenceTransaction- Throws:
com.ibm.fhir.persistence.exception.FHIRPersistenceException
-
hasBegun
public boolean hasBegun() throws com.ibm.fhir.persistence.exception.FHIRPersistenceException- Specified by:
hasBegunin interfacecom.ibm.fhir.persistence.FHIRPersistenceTransaction- Throws:
com.ibm.fhir.persistence.exception.FHIRPersistenceException
-
-