Class Jdbi3Builders


  • public class Jdbi3Builders
    extends Object
    Utilities for building Dropwizard-managed Jdbi version 3 instances.
    • Constructor Summary

      Constructors 
      Constructor Description
      Jdbi3Builders()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.jdbi.v3.core.Jdbi buildManagedJdbi​(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource, String healthCheckName, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)
      Build a Dropwizard-managed Jdbi instance with metrics and health check given an Environment, a PooledDataSourceFactory, a ManagedDataSource, and a name to give the health check.
      static org.jdbi.v3.core.Jdbi buildManagedJdbi​(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)
      Build a Dropwizard-managed Jdbi instance with metrics and health check given an Environment, a PooledDataSourceFactory, and a ManagedDataSource.
      static org.jdbi.v3.core.Jdbi buildManagedJdbi​(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, String healthCheckName, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)
      Build a Dropwizard-managed Jdbi instance with metrics and health check given an Environment, a PooledDataSourceFactory, and a name to give the health check.
      static org.jdbi.v3.core.Jdbi buildManagedJdbi​(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)
      Build a Dropwizard-managed Jdbi instance with metrics and health check given an Environment and PooledDataSourceFactory.
    • Constructor Detail

      • Jdbi3Builders

        public Jdbi3Builders()
    • Method Detail

      • buildManagedJdbi

        public static org.jdbi.v3.core.Jdbi buildManagedJdbi​(io.dropwizard.setup.Environment environment,
                                                             io.dropwizard.db.PooledDataSourceFactory dataSourceFactory,
                                                             org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)
        Build a Dropwizard-managed Jdbi instance with metrics and health check given an Environment and PooledDataSourceFactory. This will also register SqlObjectPlugin with JDBI before returning it.
        Parameters:
        environment - the Environment
        dataSourceFactory - the PooledDataSourceFactory
        jdbiPlugins - any other JdbiPlugin objects desired
        Returns:
        the Jdbi instance
        Implementation Note:
        With the exception of SqlObjectPlugin, this method will allow you to install multiple of the same plugin. User beware.
      • buildManagedJdbi

        public static org.jdbi.v3.core.Jdbi buildManagedJdbi​(io.dropwizard.setup.Environment environment,
                                                             io.dropwizard.db.PooledDataSourceFactory dataSourceFactory,
                                                             String healthCheckName,
                                                             org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)
        Build a Dropwizard-managed Jdbi instance with metrics and health check given an Environment, a PooledDataSourceFactory, and a name to give the health check.
        Parameters:
        environment - the Environment
        dataSourceFactory - the PooledDataSourceFactory
        healthCheckName - the health check's name
        jdbiPlugins - any other JdbiPlugin objects desired
        Returns:
        the Jdbi instance
        Implementation Note:
        With the exception of SqlObjectPlugin, this method will allow you to install multiple of the same plugin. User beware.
      • buildManagedJdbi

        public static org.jdbi.v3.core.Jdbi buildManagedJdbi​(io.dropwizard.setup.Environment environment,
                                                             io.dropwizard.db.PooledDataSourceFactory dataSourceFactory,
                                                             io.dropwizard.db.ManagedDataSource dataSource,
                                                             org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)
        Build a Dropwizard-managed Jdbi instance with metrics and health check given an Environment, a PooledDataSourceFactory, and a ManagedDataSource. This will also register SqlObjectPlugin with JDBI before returning it.
        Parameters:
        environment - the Environment
        dataSourceFactory - the PooledDataSourceFactory
        dataSource - the ManagedDataSource
        jdbiPlugins - any other JdbiPlugin objects desired
        Returns:
        the Jdbi instance
        Implementation Note:
        With the exception of SqlObjectPlugin, this method will allow you to install multiple of the same plugin. User beware.
      • buildManagedJdbi

        public static org.jdbi.v3.core.Jdbi buildManagedJdbi​(io.dropwizard.setup.Environment environment,
                                                             io.dropwizard.db.PooledDataSourceFactory dataSourceFactory,
                                                             io.dropwizard.db.ManagedDataSource dataSource,
                                                             String healthCheckName,
                                                             org.jdbi.v3.core.spi.JdbiPlugin... jdbiPlugins)
        Build a Dropwizard-managed Jdbi instance with metrics and health check given an Environment, a PooledDataSourceFactory, a ManagedDataSource, and a name to give the health check. This will also register SqlObjectPlugin with JDBI before returning it.
        Parameters:
        environment - the Environment
        dataSourceFactory - the PooledDataSourceFactory
        dataSource - the ManagedDataSource
        healthCheckName - the health check's name
        jdbiPlugins - any other JdbiPlugin objects desired
        Returns:
        the Jdbi instance
        Implementation Note:
        With the exception of SqlObjectPlugin, this method will allow you to install multiple of the same plugin. User beware.