Interface OneColumnMapper<ObjectT>

All Superinterfaces:
Mapper<ObjectT>

public interface OneColumnMapper<ObjectT> extends Mapper<ObjectT>
Maps the entire object of a natively supported type to a single column. Does not map the object fields.
ApiNote:
When the mapper is used for mapping key/value objects, and the schema contains single key/value column, it is possible to map an object without specifying a column name. However, if there are multiple columns, and no column is specified, table operations that use the mapper may fail with a schema mismatch exception due to ambiguity.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable TypeConverter<ObjectT,?>
    Returns a type converter for the mapped column.
    @Nullable String
    Returns a name of the column the object is mapped to or null if not specified.

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

    targetType
  • Method Details

    • mappedColumn

      @Nullable @Nullable String mappedColumn()
      Returns a name of the column the object is mapped to or null if not specified. If the column name is not specified, the mapper maps the entire object to a single available column.

      Note: If more than one key/value column is available to map to, the table operation fails with a schema mismatch exception due to ambiguity.

      Returns:
      Name of the column the entire object is mapped to or null.
    • converter

      @Nullable @Nullable TypeConverter<ObjectT,?> converter()
      Returns a type converter for the mapped column.
      Returns:
      Type converter or null if not set.