Interface RowMapperFactory

All Known Implementing Classes:
GenericMapMapperFactory, JpaMapperFactory
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 RowMapperFactory
Factory interface used to produce row mappers.
  • Method Summary

    Modifier and Type
    Method
    Description
    build(Type type, ConfigRegistry config)
    Supplies a row mapper which will map result set rows to type if the factory supports it; empty otherwise.
    of(Type type, RowMapper<?> mapper)
    Create a RowMapperFactory from a given RowMapper that matches a Type exactly.
  • Method Details

    • build

      Optional<RowMapper<?>> build(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 to
      config - the config registry, for composition
      Returns:
      a row mapper for the given type if this factory supports it; Optional.empty() otherwise.
      See Also:
    • of

      static RowMapperFactory of(Type type, RowMapper<?> mapper)
      Create a RowMapperFactory from a given RowMapper that matches a Type exactly.
      Parameters:
      type - the type to match with equals.
      mapper - the mapper to return
      Returns:
      the factory