Interface RowMapper<I>


public interface RowMapper<I>
Defines a mapping between objects of some given type and table row index.

The following invariants must hold:

    rowIdToIndex(rowIndexToId(ix)) == ix
    rowIndexToId(rowIdToIndex(id)) == id
 
Since:
14 May 2014
Author:
Mark Taylor
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the type of object used for representing row indices.
    long
    Returns the table row index corresponding to a given typed identifier.
    rowIndexToId(long index)
    Returns a typed identifer corresponding to a given row index.
  • Method Details

    • getIdClass

      Class<I> getIdClass()
      Returns the type of object used for representing row indices.
      Returns:
      mapper object class
    • rowIdToIndex

      long rowIdToIndex(I id)
      Returns the table row index corresponding to a given typed identifier.
      Parameters:
      id - identifier object
      Returns:
      corresponding row index
    • rowIndexToId

      I rowIndexToId(long index)
      Returns a typed identifer corresponding to a given row index.
      Parameters:
      index - row index
      Returns:
      corresponding identifier object