Class JdbiFreeBuilders
java.lang.Object
org.jdbi.v3.core.mapper.freebuilder.JdbiFreeBuilders
- All Implemented Interfaces:
JdbiConfig<JdbiFreeBuilders>
Configures support for an FreeBuilder generated
Builder)
value type.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this configuration object.registerFreeBuilder
(Class<?>... specs) Convenience method for registering many freebuilder types.<S> JdbiFreeBuilders
registerFreeBuilder
(Class<S> spec) Register bean arguments and row mapping for aFreebuilder
value class, expecting the default generated class and builder names.<S,
I extends S>
JdbiFreeBuildersregisterFreeBuilder
(Class<S> spec, Class<I> impl, Supplier<?> builderConstructor) Register bean arguments and row mapping for aFreeBuilder
value class, using a supplied implementation and constructor.registerFreeBuilder
(Iterable<Class<?>> specs) Convenience method for registering many freebuilder types.void
setRegistry
(ConfigRegistry registry) The registry will inject itself into the configuration object.
-
Constructor Details
-
JdbiFreeBuilders
public JdbiFreeBuilders()
-
-
Method Details
-
setRegistry
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 interfaceJdbiConfig<JdbiFreeBuilders>
- Parameters:
registry
- the registry that owns this configuration object
-
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 interfaceJdbiConfig<JdbiFreeBuilders>
- Returns:
- a copy of this configuration object.
-
registerFreeBuilder
Register bean arguments and row mapping for aFreebuilder
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
Convenience method for registering many freebuilder types.- See Also:
-
registerFreeBuilder
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 aFreeBuilder
value class, using a supplied implementation and constructor.- Type Parameters:
S
- the specification classI
- the generated value class- Parameters:
spec
- the specification interface or abstract classimpl
- the generated value classbuilderConstructor
- a supplier of new Builder instances- Returns:
- a plugin that configures type mapping for the given class
-