Class JdbiImmutables
java.lang.Object
org.jdbi.v3.core.mapper.immutables.JdbiImmutables
- All Implemented Interfaces:
JdbiConfig<JdbiImmutables>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this configuration object.registerImmutable
(Class<?>... specs) Convenience method for registering many immutable types.<S> JdbiImmutables
registerImmutable
(Class<S> spec) Register bean arguments and row mapping for anImmutable*
value class, expecting the default generated class and builder names.<S,
I extends S>
JdbiImmutablesregisterImmutable
(Class<S> spec, Class<I> impl, Supplier<?> builder) Register bean arguments and row mapping for anImmutable*
value class, using a supplied implementation and builder.registerImmutable
(Iterable<Class<?>> specs) Convenience method for registering many immutable types.registerModifiable
(Class<?>... specs) Convenience method for registering many modifiable types.<S> JdbiImmutables
registerModifiable
(Class<S> spec) Register bean arguments and row mapping for anModifiable*
value class, expecting the default generated class and public nullary constructor.<S,
M extends S>
JdbiImmutablesregisterModifiable
(Class<S> spec, Class<M> impl, Supplier<?> constructor) Register bean arguments and row mapping for anModifiable*
value class, using a supplied implementation and constructor.registerModifiable
(Iterable<Class<?>> specs) Convenience method for registering many modifiable types.void
setRegistry
(ConfigRegistry registry) The registry will inject itself into the configuration object.
-
Constructor Details
-
JdbiImmutables
public JdbiImmutables()
-
-
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<JdbiImmutables>
- Parameters:
registry
- the registry that owns this configuration object
-
registerImmutable
Register bean arguments and row mapping for anImmutable*
value class, expecting the default generated class and builder names.- Type Parameters:
S
- the specification class- Parameters:
spec
- the specification interface or abstract class- Returns:
- a plugin that configures type mapping for the given class
-
registerImmutable
Convenience method for registering many immutable types.- See Also:
-
registerImmutable
Convenience method for registering many immutable types.- See Also:
-
registerImmutable
public <S,I extends S> JdbiImmutables registerImmutable(Class<S> spec, Class<I> impl, Supplier<?> builder) Register bean arguments and row mapping for anImmutable*
value class, using a supplied implementation and builder.- Type Parameters:
S
- the specification classI
- the implementation class- Parameters:
spec
- the specification interface or abstract classimpl
- the generated implementation classbuilder
- a supplier of new Builder instances- Returns:
- a plugin that configures type mapping for the given class
-
registerModifiable
Convenience method for registering many modifiable types.- See Also:
-
registerModifiable
Convenience method for registering many modifiable types.- See Also:
-
registerModifiable
Register bean arguments and row mapping for anModifiable*
value class, expecting the default generated class and public nullary constructor.- Type Parameters:
S
- the specification class- Parameters:
spec
- the specification interface or abstract class- Returns:
- a plugin that configures type mapping for the given class
-
registerModifiable
public <S,M extends S> JdbiImmutables registerModifiable(Class<S> spec, Class<M> impl, Supplier<?> constructor) Register bean arguments and row mapping for anModifiable*
value class, using a supplied implementation and constructor.- Type Parameters:
S
- the specification classM
- the modifiable class- Parameters:
spec
- the specification interface or abstract classimpl
- the modifiable classconstructor
- a supplier of new Modifiable instances- Returns:
- a plugin that configures type mapping for the given class
-
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<JdbiImmutables>
- Returns:
- a copy of this configuration object.
-