Class SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork
java.lang.Object
dk.cloudcreate.essentials.components.foundation.transaction.spring.SpringTransactionAwareUnitOfWork<org.springframework.transaction.PlatformTransactionManager,SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork>
dk.cloudcreate.essentials.components.foundation.transaction.spring.jdbi.SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork
- All Implemented Interfaces:
HandleAwareUnitOfWork,UnitOfWork
- Enclosing class:
- SpringTransactionAwareJdbiUnitOfWorkFactory
public static class SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork
extends SpringTransactionAwareUnitOfWork<org.springframework.transaction.PlatformTransactionManager,SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork>
implements HandleAwareUnitOfWork
-
Field Summary
Fields inherited from class dk.cloudcreate.essentials.components.foundation.transaction.spring.SpringTransactionAwareUnitOfWork
unitOfWorkFactory, unitOfWorkLifecycleCallbackResources -
Constructor Summary
ConstructorsConstructorDescriptionSpringTransactionAwareHandleAwareUnitOfWork(SpringTransactionAwareUnitOfWorkFactory<org.springframework.transaction.PlatformTransactionManager, SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork> unitOfWorkFactory) SpringTransactionAwareHandleAwareUnitOfWork(SpringTransactionAwareUnitOfWorkFactory<org.springframework.transaction.PlatformTransactionManager, SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork> unitOfWorkFactory, org.springframework.transaction.TransactionStatus manuallyManagedSpringTransaction) -
Method Summary
Modifier and TypeMethodDescriptionorg.jdbi.v3.core.Handlehandle()protected voidCalled on clean up (e.g.protected voidonStart()Called when theUnitOfWorkis started.
Here any unit of work related resources (e.g.Methods inherited from class dk.cloudcreate.essentials.components.foundation.transaction.spring.SpringTransactionAwareUnitOfWork
commit, getCauseOfRollback, markAsRollbackOnly, registerLifecycleCallbackForResource, rollback, start, statusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dk.cloudcreate.essentials.components.foundation.transaction.UnitOfWork
commit, getCauseOfRollback, markAsRollbackOnly, markAsRollbackOnly, registerLifecycleCallbackForResource, rollback, rollback, start, status
-
Constructor Details
-
SpringTransactionAwareHandleAwareUnitOfWork
public SpringTransactionAwareHandleAwareUnitOfWork(SpringTransactionAwareUnitOfWorkFactory<org.springframework.transaction.PlatformTransactionManager, SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork> unitOfWorkFactory) -
SpringTransactionAwareHandleAwareUnitOfWork
public SpringTransactionAwareHandleAwareUnitOfWork(SpringTransactionAwareUnitOfWorkFactory<org.springframework.transaction.PlatformTransactionManager, SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork> unitOfWorkFactory, org.springframework.transaction.TransactionStatus manuallyManagedSpringTransaction)
-
-
Method Details
-
handle
public org.jdbi.v3.core.Handle handle()Description copied from interface:HandleAwareUnitOfWork- Specified by:
handlein interfaceHandleAwareUnitOfWork- Returns:
- the
Jdbihandle associated with the currentUnitOfWork
-
onStart
protected void onStart()Description copied from class:SpringTransactionAwareUnitOfWorkCalled when theUnitOfWorkis started.
Here any unit of work related resources (e.g. JDBI handle) can be created- Overrides:
onStartin classSpringTransactionAwareUnitOfWork<org.springframework.transaction.PlatformTransactionManager,SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork>
-
onCleanup
protected void onCleanup()Description copied from class:SpringTransactionAwareUnitOfWorkCalled on clean up (e.g. after commit/rollback) of theUnitOfWork.
Here any unit of work related resources (e.g. JDBI handle) created inSpringTransactionAwareUnitOfWork.onStart()can be closed/cleaned-up- Overrides:
onCleanupin classSpringTransactionAwareUnitOfWork<org.springframework.transaction.PlatformTransactionManager,SpringTransactionAwareJdbiUnitOfWorkFactory.SpringTransactionAwareHandleAwareUnitOfWork>
-