Interface JdbiPlugin

All Known Implementing Classes:
ConfiguringPlugin, Gson2Plugin, GuavaPlugin, H2DatabasePlugin, Jackson2Plugin, JdbiPlugin.Singleton, JodaTimePlugin, JpaPlugin, JsonPlugin, MoshiPlugin, PostgisPlugin, 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

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Abstract base class for single-install JdbiPlugins.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Connection
    Configure customizations for a newly acquired Connection.
    default Handle
    Configure customizations for a new Handle instance.
    default void
    Configure customizations global to any object managed by this Jdbi.
  • Method Details

    • customizeJdbi

      default void customizeJdbi(Jdbi jdbi) throws 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:
      SQLException - something went wrong with the database
    • customizeHandle

      default Handle customizeHandle(Handle handle) throws SQLException
      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

      default Connection customizeConnection(Connection conn) throws SQLException
      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