Interface PrefixedRowMapper<T>

Type Parameters:
T - the mapped type
All Superinterfaces:
RowMapper<T>
All Known Implementing Classes:
BeanMapper, ConstructorMapper, FieldMapper, org.jdbi.v3.core.mapper.reflect.internal.PojoMapper

@Alpha public interface PrefixedRowMapper<T> extends RowMapper<T>
A RowMapper that reads its values from columns with a common name prefix.

Mappers that implement this interface take part in prefixed mapper lookup, see RowMappers.findFor(java.lang.reflect.Type, String) and RowView.getRow(Class, String). This makes it possible to register multiple mappers for the same type, each with a different prefix, and select between them per call.

The reflective mappers (BeanMapper, ConstructorMapper, FieldMapper) implement this interface.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the column name prefix this mapper reads its values from.

    Methods inherited from interface RowMapper

    init, map, specialize
  • Method Details

    • getPrefix

      @Nonnull String getPrefix()
      Returns the column name prefix this mapper reads its values from. A mapper created without a prefix declares the empty string.
      Returns:
      the declared column name prefix, never null