Class JdbiFreeBuilders

java.lang.Object
org.jdbi.v3.core.mapper.freebuilder.JdbiFreeBuilders
All Implemented Interfaces:
JdbiConfig<JdbiFreeBuilders>

@Beta public class JdbiFreeBuilders extends Object implements JdbiConfig<JdbiFreeBuilders>
Configures support for an FreeBuilder generated Builder) value type.
  • Constructor Details

    • JdbiFreeBuilders

      public JdbiFreeBuilders()
  • Method Details

    • setRegistry

      public void setRegistry(ConfigRegistry registry)
      Description copied from interface: JdbiConfig
      The registry will inject itself into the configuration object. This can be useful if you need to look up dependencies. You will get a new registry after being copied.
      Specified by:
      setRegistry in interface JdbiConfig<JdbiFreeBuilders>
      Parameters:
      registry - the registry that owns this configuration object
    • createCopy

      public JdbiFreeBuilders createCopy()
      Description copied from interface: JdbiConfig
      Returns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.
      Specified by:
      createCopy in interface JdbiConfig<JdbiFreeBuilders>
      Returns:
      a copy of this configuration object.
    • registerFreeBuilder

      public <S> JdbiFreeBuilders registerFreeBuilder(Class<S> spec)
      Register bean arguments and row mapping for a Freebuilder value class, expecting the default generated class and builder names.
      Type Parameters:
      S - the specification class
      Parameters:
      spec - the specification interface of abstract class
      Returns:
      a plugin that configures type mapping for the given class
    • registerFreeBuilder

      public JdbiFreeBuilders registerFreeBuilder(Class<?>... specs)
      Convenience method for registering many freebuilder types.
      See Also:
    • registerFreeBuilder

      public JdbiFreeBuilders registerFreeBuilder(Iterable<Class<?>> specs)
      Convenience method for registering many freebuilder types.
      See Also:
    • registerFreeBuilder

      public <S, I extends S> JdbiFreeBuilders registerFreeBuilder(Class<S> spec, Class<I> impl, Supplier<?> builderConstructor)
      Register bean arguments and row mapping for a FreeBuilder value class, using a supplied implementation and constructor.
      Type Parameters:
      S - the specification class
      I - the generated value class
      Parameters:
      spec - the specification interface or abstract class
      impl - the generated value class
      builderConstructor - a supplier of new Builder instances
      Returns:
      a plugin that configures type mapping for the given class