Package oracle.jdbc

Interface OracleRow

  • All Superinterfaces:
    java.lang.Cloneable

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      OracleRow clone()
      Creates and returns a persistent copy of this row.
      <T> T getObject​(int columnIndex, java.lang.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​(java.lang.String columnLabel, java.lang.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 Detail

      • getObject

        <T> T getObject​(int columnIndex,
                        java.lang.Class<T> type)
                 throws java.sql.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:
        java.sql.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​(java.lang.String columnLabel,
                        java.lang.Class<T> type)
                 throws java.sql.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:
        java.sql.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.