Package org.jdbi.v3.core.spi
Interface JdbiPlugin
-
- All Known Implementing Classes:
ConfiguringPlugin,Gson2Plugin,GuavaPlugin,H2DatabasePlugin,Jackson2Plugin,JdbiPlugin.Singleton,JodaTimePlugin,JpaPlugin,JsonPlugin,NoopCachePlugin,PostgisPlugin,PostgresPlugin,SQLitePlugin,SqlObjectPlugin,VavrPlugin
public interface JdbiPluginA plugin is given an opportunity to customize instances of variousJdbitypes before they are returned from their factories.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classJdbiPlugin.SingletonAbstract base class for single-install JdbiPlugins.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.sql.ConnectioncustomizeConnection(java.sql.Connection conn)Configure customizations for a newly acquired Connection.default HandlecustomizeHandle(Handle handle)Configure customizations for a new Handle instance.default voidcustomizeJdbi(Jdbi jdbi)Configure customizations global to any object managed by this Jdbi.
-
-
-
Method Detail
-
customizeJdbi
default void customizeJdbi(Jdbi jdbi) throws java.sql.SQLException
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:
java.sql.SQLException- something went wrong with the database
-
customizeHandle
default Handle customizeHandle(Handle handle) throws java.sql.SQLException
Configure customizations for a new Handle instance.- Parameters:
handle- the handle just created- Returns:
- the transformed handle
- Throws:
java.sql.SQLException- something went wrong with the database
-
customizeConnection
default java.sql.Connection customizeConnection(java.sql.Connection conn) throws java.sql.SQLExceptionConfigure customizations for a newly acquired Connection.- Parameters:
conn- the connection Jdbi acquired- Returns:
- the transformed connection to use
- Throws:
java.sql.SQLException- something went wrong with the database
-
-