Package org.jdbi.v3.core
Class TransactionalHandleSupplier
java.lang.Object
org.jdbi.v3.core.TransactionalHandleSupplier
- All Implemented Interfaces:
AutoCloseable,org.jdbi.v3.core.extension.HandleSupplier
@Singleton
public class TransactionalHandleSupplier
extends Object
implements org.jdbi.v3.core.extension.HandleSupplier
Bridge have to lie in jdbi package in order have access to internal methods. Implementation is the same
as in
ConstantHandleSupplier, except handler and config are obtained dynamically.- Since:
- 31.08.2018
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionalHandleSupplier(org.jdbi.v3.core.Jdbi jdbi, jakarta.inject.Provider<org.jdbi.v3.core.Handle> handleProvider) Create a transactional handle supplier. -
Method Summary
Modifier and TypeMethodDescriptionorg.jdbi.v3.core.config.ConfigRegistryorg.jdbi.v3.core.Handleorg.jdbi.v3.core.JdbigetJdbi()<V> VinvokeInContext(org.jdbi.v3.core.extension.ExtensionContext extensionContext, Callable<V> task) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jdbi.v3.core.extension.HandleSupplier
close
-
Constructor Details
-
TransactionalHandleSupplier
@Inject public TransactionalHandleSupplier(org.jdbi.v3.core.Jdbi jdbi, jakarta.inject.Provider<org.jdbi.v3.core.Handle> handleProvider) Create a transactional handle supplier.- Parameters:
jdbi- jdbi instancehandleProvider- handle provider
-
-
Method Details
-
getHandle
public org.jdbi.v3.core.Handle getHandle()- Specified by:
getHandlein interfaceorg.jdbi.v3.core.extension.HandleSupplier
-
getJdbi
public org.jdbi.v3.core.Jdbi getJdbi()- Specified by:
getJdbiin interfaceorg.jdbi.v3.core.extension.HandleSupplier
-
invokeInContext
public <V> V invokeInContext(org.jdbi.v3.core.extension.ExtensionContext extensionContext, Callable<V> task) throws Exception - Specified by:
invokeInContextin interfaceorg.jdbi.v3.core.extension.HandleSupplier- Throws:
Exception
-
getConfig
public org.jdbi.v3.core.config.ConfigRegistry getConfig()- Specified by:
getConfigin interfaceorg.jdbi.v3.core.extension.HandleSupplier
-