Package oracle.jdbc

Interface OracleRow

All Superinterfaces:
Cloneable

public interface OracleRow extends Cloneable
One row of a sequence of rows represented by a ResultSet. Immutable.
Since:
20
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates and returns a persistent copy of this row.
    <T> T
    getObject(int columnIndex, Class<T> type)
    Retrieves the value of the designated column of this OracleRow object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.
    <T> T
    getObject(String columnLabel, Class<T> type)
    Retrieves the value of the designated column of this OracleRow object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.
  • Method Details

    • getObject

      <T> T getObject(int columnIndex, Class<T> type) throws SQLException

      Retrieves the value of the designated column of this OracleRow object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported. If the conversion is not supported or null is specified for the type, a SQLException is thrown.

      At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements SQLData, or Struct. Additional conversions may be supported and are vendor defined.

      Type Parameters:
      T - the type of the class modeled by this Class object
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      type - Class representing the Java data type to convert the designated column to.
      Returns:
      an instance of type holding the column value
      Throws:
      SQLException - if conversion is not supported, type is null or another error occurs. The getCause() method of the exception may provide a more detailed exception, for example, if a conversion error occurs
    • getObject

      <T> T getObject(String columnLabel, Class<T> type) throws SQLException

      Retrieves the value of the designated column of this OracleRow object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported. If the conversion is not supported or null is specified for the type, a SQLException is thrown.

      At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements SQLData, or Struct. Additional conversions may be supported and are vendor defined.

      Type Parameters:
      T - the type of the class modeled by this Class object
      Parameters:
      columnLabel - the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column
      type - Class representing the Java data type to convert the designated column to.
      Returns:
      an instance of type holding the column value
      Throws:
      SQLException - if conversion is not supported, type is null or another error occurs. The getCause() method of the exception may provide a more detailed exception, for example, if a conversion error occurs
    • clone

      OracleRow clone()
      Creates and returns a persistent copy of this row. The returned row retains the same data as this row indefinitely, with no dependency upon the resources or conditions that this row may depdend on.

      Aside from the behavior stated here, OracleRow.clone() does NOT follow any typical conventions of Object.clone().

      Returns:
      A persistent copy of this row.