Package org.jdbi.v3.core.spi
Interface JdbiPlugin
- All Known Implementing Classes:
GuavaPlugin
,H2DatabasePlugin
,Jackson2Plugin
,JdbiPlugin.Singleton
,JodaTimePlugin
,JpaPlugin
,JsonPlugin
,PostgresPlugin
,SQLitePlugin
,SqlObjectPlugin
,VavrPlugin
public interface JdbiPlugin
A plugin is given an opportunity to customize instances of various
Jdbi
types before they are returned from their factories.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Abstract base class for single-install JdbiPlugins. -
Method Summary
Modifier and TypeMethodDescriptiondefault Connection
Configure customizations for a newly acquired Connection.default Handle
customizeHandle
(Handle handle) Configure customizations for a new Handle instance.default void
customizeJdbi
(Jdbi jdbi) Configure customizations global to any object managed by this Jdbi.
-
Method Details
-
customizeJdbi
Configure customizations global to any object managed by this Jdbi. This method is invoked immediately when the plugin is installed.- Parameters:
jdbi
- the jdbi to customize- Throws:
SQLException
- something went wrong with the database
-
customizeHandle
Configure customizations for a new Handle instance.- Parameters:
handle
- the handle just created- Returns:
- the transformed handle
- Throws:
SQLException
- something went wrong with the database
-
customizeConnection
Configure customizations for a newly acquired Connection.- Parameters:
conn
- the connection Jdbi acquired- Returns:
- the transformed connection to use
- Throws:
SQLException
- something went wrong with the database
-