Interface JdbcValueReader


public interface JdbcValueReader
The interface used to read column values from a JDBC ResultSet.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final JdbcValueReader
    Deprecated.
    use ORIGINAL to replicate the pre-8.0.0 default behavior.
    static final JdbcValueReader
    Maps database types to java types based only on java.sql.Types, column display size, and scale.
    static final JdbcValueReader
     
    static final JdbcValueReader
    Maps database types to java types based only on java.sql.Types as defined by Sun/Oracle.
  • Method Summary

    Modifier and Type
    Method
    Description
    readColumnValue(ResultSet result, int columnIndex, int columnType, String columnName)
    Reads the 1-based column's value from the current row; columnType is the column's Types code.
    default Object
    readColumnValue(ResultSet result, int columnIndex, int columnType, String columnName, FieldType fieldType)
    Reads the 1-based column's value from the current row as the given field type, returning null for SQL NULL; the default ignores fieldType and calls the overload without it.
    default Class<?>
    sqlToJavaType(int sqlTypeIndex, int displaySize, int decimals, boolean nullable, boolean signed, String className)
    Returns the Java class used for a column with the given Types code, display size, scale (decimals) and other metadata; the default applies the pre-8.0.0 mapping of ORIGINAL.
  • Field Details

    • ORIGINAL

      static final JdbcValueReader ORIGINAL
    • DEFAULT

      @Deprecated static final JdbcValueReader DEFAULT
      Deprecated.
      use ORIGINAL to replicate the pre-8.0.0 default behavior. Maps database types to java types using the original DataPipeline algorithm. This mapping should no longer be used and replaced with OPINIONATED (or STRICT) instead.
    • STRICT

      static final JdbcValueReader STRICT
      Maps database types to java types based only on java.sql.Types as defined by Sun/Oracle. Column display size and scale will not be considered for numeric types.
      See Also:
    • OPINIONATED

      static final JdbcValueReader OPINIONATED
      Maps database types to java types based only on java.sql.Types, column display size, and scale.
      See Also:
  • Method Details

    • sqlToJavaType

      default Class<?> sqlToJavaType(int sqlTypeIndex, int displaySize, int decimals, boolean nullable, boolean signed, String className) throws Throwable
      Returns the Java class used for a column with the given Types code, display size, scale (decimals) and other metadata; the default applies the pre-8.0.0 mapping of ORIGINAL.
      Throws:
      Throwable
    • readColumnValue

      Object readColumnValue(ResultSet result, int columnIndex, int columnType, String columnName) throws Throwable
      Reads the 1-based column's value from the current row; columnType is the column's Types code.
      Throws:
      Throwable
    • readColumnValue

      default Object readColumnValue(ResultSet result, int columnIndex, int columnType, String columnName, FieldType fieldType) throws Throwable
      Reads the 1-based column's value from the current row as the given field type, returning null for SQL NULL; the default ignores fieldType and calls the overload without it.
      Throws:
      Throwable