Interface PojoMapper<T>

Type Parameters:
T - Target type.
All Superinterfaces:
Mapper<T>

public interface PojoMapper<T> extends Mapper<T>
Maps fields of objects of type PojoMapper to columns by name. Every mapped field must be of a natively supported type. Alternatively, a converter must be provided.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <FieldT, ColumnT>
    TypeConverter<FieldT,ColumnT>
    Returns a type converter for a given column.
    @Nullable String
    fieldForColumn(String columnName)
    Returns a field name for a given column name when POJO individual fields are mapped to columns, otherwise fails.
    Returns all fields that should be mapped to columns.

    Methods inherited from interface org.apache.ignite.table.mapper.Mapper

    targetType
  • Method Details

    • fieldForColumn

      @Nullable @Nullable String fieldForColumn(String columnName)
      Returns a field name for a given column name when POJO individual fields are mapped to columns, otherwise fails.
      Parameters:
      columnName - Column name.
      Returns:
      Field name or null if no field is mapped to the column.
      Throws:
      IllegalStateException - If the entire object is mapped to a single column.
    • fields

      Collection<String> fields()
      Returns all fields that should be mapped to columns.
      Returns:
      Field names.
    • converterForColumn

      <FieldT, ColumnT> TypeConverter<FieldT,ColumnT> converterForColumn(String columnName)
      Returns a type converter for a given column.
      Returns:
      Type converter or null if not set.