Uses of Class
org.jdbi.v3.core.Handle
Packages that use Handle
Package
Description
The 'core' package hosts the top level interface into jdbi core.
The
extension classes allow you to extend Jdbi's
functionality by declaring interface types that may attach to Handle
instances.
The
spi package includes entrypoints to extending Jdbi
instances with your own custom functionality.
The
statement package provides most of the Fluent API
to drive statement execution.
The
transaction package implements the strategy
Jdbi uses to open and close transactions.
The
postgres plugin provides improved support for
java.time, hstore, uuid, and enum
types when configured with a recent Postgres database server.
Classes here provide integration hooks for working with the Spring framework.
SQL Objects
JUnit 4 testing support.
JUnit 5 testing support.
-
Uses of Handle in org.jdbi.v3.core
Methods in org.jdbi.v3.core that return HandleModifier and TypeMethodDescriptionHandle.addHandleListener(HandleListener handleListener) Add a specificHandleListenerwhich is called for specific events for this Handle.Handle.afterCommit(Runnable afterCommit) Execute an action the next time this Handle commits, unless it is rolled back first.Handle.afterRollback(Runnable afterRollback) Execute an action the next time this Handle rolls back, unless it is committed first.Handle.begin()Start a transaction.Handle.commit()Commit a transaction.Jdbi.open()Obtain a Handle to the data source wrapped by this Jdbi instance.static HandleObtain a handle with just a JDBC URLstatic HandleObtain a handle with just a JDBC URLstatic HandleJdbi.open(String url, Properties props) Obtain a handle with just a JDBC URLstatic HandleJdbi.open(Connection connection) Create a Handle wrapping a particular JDBC Connectionstatic HandleJdbi.open(DataSource dataSource) Convenience method used to obtain a handle from a specific data sourcestatic HandleJdbi.open(ConnectionFactory connectionFactory) Convenience method used to obtain a handle from aConnectionFactory.Deprecated.Handle.releaseSavepoint(String savepointName) Release a previously created savepoint.Handle.removeHandleListener(HandleListener handleListener) Remove aHandleListenerfrom this handle.Handle.rollback()Rollback a transaction.Handle.rollbackToSavepoint(String savepointName) Rollback a transaction to a named savepoint.Create a transaction savepoint with the name provided.Handle.setReadOnly(boolean readOnly) Set the Handle read-only.Handle.setStatementBuilder(StatementBuilder builder) Set the statement builder for this handle.Methods in org.jdbi.v3.core with parameters of type HandleModifier and TypeMethodDescriptiondefault voidHandleListener.handleClosed(Handle handle) A handle was closed.default voidHandleListener.handleCreated(Handle handle) A handle was created.voidWill be invoked with an open Handle.HandleCallback.withHandle(Handle handle) Will be invoked with an open Handle. -
Uses of Handle in org.jdbi.v3.core.extension
Methods in org.jdbi.v3.core.extension that return Handle -
Uses of Handle in org.jdbi.v3.core.spi
Methods in org.jdbi.v3.core.spi that return HandleModifier and TypeMethodDescriptiondefault HandleJdbiPlugin.customizeHandle(Handle handle) Configure customizations for a new Handle instance.Methods in org.jdbi.v3.core.spi with parameters of type HandleModifier and TypeMethodDescriptiondefault HandleJdbiPlugin.customizeHandle(Handle handle) Configure customizations for a new Handle instance. -
Uses of Handle in org.jdbi.v3.core.statement
Constructors in org.jdbi.v3.core.statement with parameters of type HandleModifierConstructorDescriptionCall(Handle handle, CharSequence sql) Backwards compatible constructor that takes an explicit string argument.MetaData(Handle handle, MetaData.MetaDataValueProvider<?> metaDataFunction) PreparedBatch(Handle handle, CharSequence sql) PreparedBatch(Handle handle, String sql) Backwards compatible constructor that takes an explicit string argument.Query(Handle handle, CharSequence sql) Backwards compatible constructor that takes an explicit string argument.Script(Handle handle, CharSequence sql) Backwards compatible constructor that takes an explicit string argument.Update(Handle handle, CharSequence sql) Backwards compatible constructor that takes an explicit string argument. -
Uses of Handle in org.jdbi.v3.core.transaction
Methods in org.jdbi.v3.core.transaction with parameters of type HandleModifier and TypeMethodDescriptionvoidCalled when a transaction is startedvoidvoidvoidBegin a transaction.voidCalled when a transaction is committedvoidvoidvoidvoidCommit the transaction.<R,X extends Exception>
RCMTTransactionHandler.inTransaction(Handle handle, HandleCallback<R, X> callback) <R,X extends Exception>
RCMTTransactionHandler.inTransaction(Handle handle, TransactionIsolationLevel level, HandleCallback<R, X> callback) <R,X extends Exception>
RDelegatingTransactionHandler.inTransaction(Handle handle, HandleCallback<R, X> callback) <R,X extends Exception>
RDelegatingTransactionHandler.inTransaction(Handle handle, TransactionIsolationLevel level, HandleCallback<R, X> callback) <R,X extends Exception>
RLocalTransactionHandler.inTransaction(Handle handle, HandleCallback<R, X> callback) <R,X extends Exception>
RLocalTransactionHandler.inTransaction(Handle handle, TransactionIsolationLevel level, HandleCallback<R, X> callback) <R,X extends Exception>
RSerializableTransactionRunner.inTransaction(Handle handle, HandleCallback<R, X> callback) <R,X extends Exception>
RSerializableTransactionRunner.inTransaction(Handle handle, TransactionIsolationLevel level, HandleCallback<R, X> callback) <R,X extends Exception>
RTransactionHandler.inTransaction(Handle handle, HandleCallback<R, X> callback) Run a transaction.<R,X extends Exception>
RTransactionHandler.inTransaction(Handle handle, TransactionIsolationLevel level, HandleCallback<R, X> callback) Run a transaction.booleanCMTTransactionHandler.isInTransaction(Handle handle) Called to test if a handle is in a transactionbooleanDelegatingTransactionHandler.isInTransaction(Handle handle) booleanLocalTransactionHandler.isInTransaction(Handle handle) booleanTransactionHandler.isInTransaction(Handle handle) Returns whether a given Handle is in the transaction.voidCMTTransactionHandler.releaseSavepoint(Handle handle, String savepointName) Savepoints are not supported.voidDelegatingTransactionHandler.releaseSavepoint(Handle handle, String name) voidLocalTransactionHandler.releaseSavepoint(Handle handle, String savepointName) voidTransactionHandler.releaseSavepoint(Handle handle, String savepointName) Release a previously created savepoint.voidCalled when a transaction is rolled back Will throw a RuntimeException to force transactional rollbackvoidvoidvoidRoll back the transaction.voidCMTTransactionHandler.rollbackToSavepoint(Handle handle, String name) Savepoints are not supported.voidDelegatingTransactionHandler.rollbackToSavepoint(Handle handle, String name) voidLocalTransactionHandler.rollbackToSavepoint(Handle handle, String savepointName) voidTransactionHandler.rollbackToSavepoint(Handle handle, String savepointName) Roll back to a named savepoint.voidSavepoints are not supported.voidvoidvoidCreate a new savepoint.SerializableTransactionRunner.specialize(Handle handle) default TransactionHandlerTransactionHandler.specialize(Handle handle) Bind a TransactionHandler to a Handle, to allow it to track handle-local state. -
Uses of Handle in org.jdbi.v3.postgres
Methods in org.jdbi.v3.postgres that return HandleMethods in org.jdbi.v3.postgres with parameters of type Handle -
Uses of Handle in org.jdbi.v3.spring5
Methods in org.jdbi.v3.spring5 that return HandleModifier and TypeMethodDescriptionstatic HandleObtain a Handle instance, either the transactionally bound one if we are in a transaction, or a new one otherwise.Methods in org.jdbi.v3.spring5 with parameters of type HandleModifier and TypeMethodDescriptionstatic voidJdbiUtil.closeIfNeeded(Handle handle) Close a handle if it is not transactionally bound, otherwise no-op -
Uses of Handle in org.jdbi.v3.sqlobject
Methods in org.jdbi.v3.sqlobject that return Handle -
Uses of Handle in org.jdbi.v3.testing
Methods in org.jdbi.v3.testing that return Handle -
Uses of Handle in org.jdbi.v3.testing.junit5
Methods in org.jdbi.v3.testing.junit5 that return HandleModifier and TypeMethodDescriptionfinal HandleJdbiExtension.getSharedHandle()Returns a sharedHandleused by the extension.final HandleJdbiExtension.openHandle()Open a newHandleto the used data source.Methods in org.jdbi.v3.testing.junit5 with parameters of type HandleModifier and TypeMethodDescriptiondefault voidJdbiExtensionInitializer.cleanup(DataSource ds, Handle handle) Run cleanup code after a test.voidJdbiFlywayMigration.cleanup(DataSource ds, Handle handle) voidJdbiExtensionInitializer.initialize(DataSource ds, Handle handle) Run initialization code before a test.voidJdbiFlywayMigration.initialize(DataSource ds, Handle handle)
releaseSavepoint(String)