Package org.jdbi.v3.core.mapper
Class InferredColumnMapperFactory
java.lang.Object
org.jdbi.v3.core.mapper.InferredColumnMapperFactory
- All Implemented Interfaces:
QualifiedColumnMapperFactory
A generic QualifiedColumnMapperFactory that reflectively inspects a
ColumnMapper<T> and maps only to columns of type
T, with type qualifiers equal to the qualifiers present on
the mapper class. The type parameter T must be accessible
via reflection or an UnsupportedOperationException
will be thrown.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<ColumnMapper<?>>build(QualifiedType<?> type, ConfigRegistry config) Supplies a column mapper which will map columns to type if the factory supports it; empty otherwise.
-
Field Details
-
maps
-
mapper
-
-
Constructor Details
-
InferredColumnMapperFactory
InferredColumnMapperFactory(ColumnMapper<?> mapper)
-
-
Method Details
-
build
Description copied from interface:QualifiedColumnMapperFactorySupplies a column mapper which will map columns to type if the factory supports it; empty otherwise.- Specified by:
buildin interfaceQualifiedColumnMapperFactory- Parameters:
type- the target qualified 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:
-