Interface RowMapper<T>

Type Parameters:
T - the type of object to map from the result set

public interface RowMapper<T>
Maps each row of a JDBC ResultSet to a Java object of type T.
  • Field Details

    • STRING_MAPPER

      static final RowMapper<String> STRING_MAPPER
      Mapper for String.
    • INTEGER_MAPPER

      static final RowMapper<Integer> INTEGER_MAPPER
      Mapper for Integer.
    • BYTE_MAPPER

      static final RowMapper<Byte> BYTE_MAPPER
      Mapper for BYTE.
    • BYTES_MAPPER

      static final RowMapper<byte[]> BYTES_MAPPER
      Mapper for bytes.
    • SHORT_MAPPER

      static final RowMapper<Short> SHORT_MAPPER
      Mapper for Short.
    • URL_MAPPER

      static final RowMapper<URL> URL_MAPPER
      Mapper for URL.
    • DOUBLE_MAPPER

      static final RowMapper<Double> DOUBLE_MAPPER
      Mapper for Double.
    • FLOAT_MAPPER

      static final RowMapper<Float> FLOAT_MAPPER
      Mapper for Float.
    • BIG_DECIMAL_MAPPER

      static final RowMapper<BigDecimal> BIG_DECIMAL_MAPPER
      Mapper for BigDecimal.
    • BOOLEAN_MAPPER

      static final RowMapper<Boolean> BOOLEAN_MAPPER
      Mapper for Boolean.
    • LONG_MAPPER

      static final RowMapper<Long> LONG_MAPPER
      Mapper for Long.
    • DATE_MAPPER

      static final RowMapper<Date> DATE_MAPPER
      Mapper for Date.
    • TIME_MAPPER

      static final RowMapper<Time> TIME_MAPPER
      Mapper for Time.
    • TIMESTAMP_MAPPER

      static final RowMapper<Timestamp> TIMESTAMP_MAPPER
      Mapper for TimeStamp.
    • OBJECT_MAPPER

      static final RowMapper<Object> OBJECT_MAPPER
      Mapper for Object.
  • Method Details

    • get

      T get(ResultSet rs) throws SQLException
      Maps a single row of the result set to an object of type T.
      Parameters:
      rs - the ResultSet to map from
      Returns:
      mapped object of type T
      Throws:
      SQLException - if an error occurs during mapping