Package org.jdbi.v3.core.mapper
Interface RowMapperFactory
-
- All Known Implementing Classes:
GenericMapMapperFactory,InferredRowMapperFactory,JpaMapperFactory,PojoMapperFactory,VavrTupleRowMapperFactory
- 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 RowMapperFactoryFactory interface used to produce row mappers.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<RowMapper<?>>build(java.lang.reflect.Type type, ConfigRegistry config)Supplies a row mapper which will map result set rows to type if the factory supports it; empty otherwise.static RowMapperFactoryof(java.lang.reflect.Type type, RowMapper<?> mapper)Create a RowMapperFactory from a givenRowMapperthat matches aTypeexactly.
-
-
-
Method Detail
-
build
java.util.Optional<RowMapper<?>> build(java.lang.reflect.Type type, ConfigRegistry config)
Supplies a row mapper which will map result set rows to type if the factory supports it; empty otherwise.- Parameters:
type- the target type to map toconfig- the config registry, for composition- Returns:
- a row mapper for the given type if this factory supports it;
Optional.empty()otherwise. - See Also:
for composition
-
of
static RowMapperFactory of(java.lang.reflect.Type type, RowMapper<?> mapper)
Create a RowMapperFactory from a givenRowMapperthat matches aTypeexactly.- Parameters:
type- the type to match with equals.mapper- the mapper to return- Returns:
- the factory
-
-