Package org.jdbi.v3.core.enums.internal
Class EnumMapperFactory
- java.lang.Object
-
- org.jdbi.v3.core.enums.internal.EnumMapperFactory
-
- All Implemented Interfaces:
QualifiedColumnMapperFactory
public class EnumMapperFactory extends java.lang.Object implements QualifiedColumnMapperFactory
-
-
Constructor Summary
Constructors Constructor Description EnumMapperFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<ColumnMapper<?>>build(QualifiedType<?> givenType, ConfigRegistry config)Supplies a column mapper which will map columns to type if the factory supports it; empty otherwise.private static <E extends java.lang.Enum<E>>
ColumnMapper<?>makeEnumArgument(QualifiedType<E> givenType, java.lang.Class<E> enumClass, ConfigRegistry config)
-
-
-
Method Detail
-
build
public java.util.Optional<ColumnMapper<?>> build(QualifiedType<?> givenType, ConfigRegistry config)
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:
givenType- 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:
for composition,QualifiedType
-
makeEnumArgument
private static <E extends java.lang.Enum<E>> ColumnMapper<?> makeEnumArgument(QualifiedType<E> givenType, java.lang.Class<E> enumClass, ConfigRegistry config)
-
-