Package org.jdbi.v3.core.mapper
Interface ColumnMapperFactory
-
- All Known Implementing Classes:
BitStringEnumSetMapperFactory,BlobInputStreamColumnMapperFactory,BoxedMapperFactory,BuiltInMapperFactory,ClobReaderColumnMapperFactory,DurationColumnMapperFactory,EnumByNameMapperFactory,EnumByOrdinalMapperFactory,EssentialsMapperFactory,GetObjectColumnMapperFactory,InternetMapperFactory,JavaTimeMapperFactory,JavaTimeMapperFactory,JsonColumnMapperFactory,OptionalMapperFactory,PeriodColumnMapperFactory,PGobjectColumnMapperFactory,PrimitiveMapperFactory,SqlArrayMapperFactory,SqlTimeMapperFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ColumnMapperFactoryFactory interface used to produce column mappers.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<ColumnMapper<?>>build(java.lang.reflect.Type type, ConfigRegistry config)Supplies a column mapper which will map columns to type if the factory supports it; empty otherwise.static ColumnMapperFactoryof(java.lang.reflect.Type type, ColumnMapper<?> mapper)Create a ColumnMapperFactory from a givenColumnMapperthat matches a single Type exactly.
-
-
-
Method Detail
-
build
java.util.Optional<ColumnMapper<?>> build(java.lang.reflect.Type type, ConfigRegistry config)
Supplies a column mapper which will map columns to type if the factory supports it; empty otherwise.- Parameters:
type- the target type to map toconfig- the config registry, for composition- Returns:
- a column mapper for the given type if this factory supports it, or
Optional.empty()otherwise. - See Also:
for composition
-
of
static ColumnMapperFactory of(java.lang.reflect.Type type, ColumnMapper<?> mapper)
Create a ColumnMapperFactory from a givenColumnMapperthat matches a single Type exactly.- Parameters:
type- the type to match with equals.mapper- the mapper to return- Returns:
- the factory
-
-