Interface IValueAccess

All Known Subinterfaces:
IDbResultSet, IDbRow
All Known Implementing Classes:
DbDisconnectedRow, DbResultSet

public interface IValueAccess
  • Method Details

    • wasNull

      boolean wasNull(int p_iIdx) throws SQLException
      Check if the value in the given column was null.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      true if the value was null, or false otherwise.
      Throws:
      SQLException - If a database error occurred.
    • getBooleanValue

      Boolean getBooleanValue(int p_iIdx) throws SQLException, ValueCastException
      Get a boolean value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A boolean value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to boolean.
      SQLException - If a database error occurred.
    • getBooleanValue

      Boolean getBooleanValue(int p_iIdx, Boolean p_valueIfNull) throws SQLException, ValueCastException
      Get a boolean value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A boolean value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to boolean.
      SQLException - If a database error occurred.
    • getByteValue

      byte getByteValue(int p_iIdx) throws SQLException, ValueCastException
      Get a byte value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A byte value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to byte.
      SQLException - If a database error occurred.
    • getByteValue

      Byte getByteValue(int p_iIdx, Byte p_valueIfNull) throws SQLException, ValueCastException
      Get a byte value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A byte value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to byte.
      SQLException - If a database error occurred.
    • getShortValue

      Short getShortValue(int p_iIdx) throws SQLException, ValueCastException
      Get a short value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A short value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to short.
      SQLException - If a database error occurred.
    • getShortValue

      Short getShortValue(int p_iIdx, Short p_valueIfNull) throws SQLException, ValueCastException
      Get a short value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A short value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to short.
      SQLException - If a database error occurred.
    • getIntValue

      Integer getIntValue(int p_iIdx) throws SQLException, ValueCastException
      Get an integer value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      An integer value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to integer.
      SQLException - If a database error occurred.
    • getIntValue

      Integer getIntValue(int p_iIdx, Integer p_valueIfNull) throws SQLException, ValueCastException
      Get an integer value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      An integer value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to integer.
      SQLException - If a database error occurred.
    • getLongValue

      Long getLongValue(int p_iIdx) throws SQLException, ValueCastException
      Get a long value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A long value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to long.
      SQLException - If a database error occurred.
    • getLongValue

      Long getLongValue(int p_iIdx, Long p_valueIfNull) throws SQLException, ValueCastException
      Get a long value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A long value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to long.
      SQLException - If a database error occurred.
    • getFloatValue

      Float getFloatValue(int p_iIdx) throws SQLException, ValueCastException
      Get a single precision float value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A float value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to float.
      SQLException - If a database error occurred.
    • getFloatValue

      Float getFloatValue(int p_iIdx, Float p_valueIfNull) throws SQLException, ValueCastException
      Get a single precision float value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A float value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to float.
      SQLException - If a database error occurred.
    • getDoubleValue

      Double getDoubleValue(int p_iIdx) throws SQLException, ValueCastException
      Get a double value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A double value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to double.
      SQLException - If a database error occurred.
    • getDoubleValue

      Double getDoubleValue(int p_iIdx, Double p_valueIfNull) throws SQLException, ValueCastException
      Get a double precision float value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A double value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to double.
      SQLException - If a database error occurred.
    • getBigDecimalValue

      BigDecimal getBigDecimalValue(int p_iIdx) throws SQLException, ValueCastException
      Get a decimal number value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A BigDecimal value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to BigDecimal.
      SQLException - If a database error occurred.
    • getBigDecimalValue

      BigDecimal getBigDecimalValue(int p_iIdx, BigDecimal p_valueIfNull) throws SQLException, ValueCastException
      Get a decimal number value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A BigDecimal value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to BigDecimal.
      SQLException - If a database error occurred.
    • getStringValue

      String getStringValue(int p_iIdx) throws SQLException, ValueCastException
      Get a string value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A string value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to a string.
      SQLException - If a database error occurred.
    • getStringValue

      String getStringValue(int p_iIdx, String p_valueIfNull) throws SQLException, ValueCastException
      Get a string value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A string value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to string.
      SQLException - If a database error occurred.
    • getTimestampValue

      Timestamp getTimestampValue(int p_iIdx) throws SQLException, ValueCastException
      Get a timestamp value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A timestamp value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to a timestamp.
      SQLException - If a database error occurred.
    • getTimestampValue

      Timestamp getTimestampValue(int p_iIdx, Timestamp p_valueIfNull) throws SQLException, ValueCastException
      Get a timestamp value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A timestamp value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to timestamp.
      SQLException - If a database error occurred.
    • getDateValue

      Date getDateValue(int p_iIdx) throws SQLException, ValueCastException
      Get a date value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A date value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to date.
      SQLException - If a database error occurred.
    • getDateValue

      Date getDateValue(int p_iIdx, Date p_valueIfNull) throws SQLException, ValueCastException
      Get a date value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A date value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to date.
      SQLException - If a database error occurred.
    • getTimeValue

      Date getTimeValue(int p_iIdx) throws SQLException, ValueCastException
      Get a time value.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      A time value, or null.
      Throws:
      ValueCastException - If the database value could not be cast to time.
      SQLException - If a database error occurred.
    • getTimeValue

      Date getTimeValue(int p_iIdx, Date p_valueIfNull) throws SQLException, ValueCastException
      Get a time value.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      A time value, or p_valueIfNull.
      Throws:
      ValueCastException - If the database value could not be cast to time.
      SQLException - If a database error occurred.
    • getValue

      Object getValue(int p_iIdx) throws SQLException
      Get a value. Note: The use of this method is discouraged. Use a method that returns a specified type instead.
      Parameters:
      p_iIdx - The 1-based column index.
      Returns:
      The value.
      Throws:
      SQLException - If a database error occurred.
    • getValue

      Object getValue(int p_iIdx, Object p_valueIfNull) throws SQLException
      Get a value. Note: The use of this method is discouraged. Use a method that returns a specified type instead.
      Parameters:
      p_iIdx - The 1-based column index.
      p_valueIfNull - The value to be returned if the database value was NULL.
      Returns:
      The value, or p_valueIfNull.
      Throws:
      SQLException - If a database error occurred.