Package oracle.sql

Class OPAQUE

  • All Implemented Interfaces:
    Serializable, oracle.jdbc.internal.ACProxyable, oracle.jdbc.internal.OracleDatumWithConnection, oracle.jdbc.internal.OracleOpaque, OracleOpaque

    public class OPAQUE
    extends DatumWithConnection
    implements oracle.jdbc.internal.OracleOpaque
    Deprecated.
    Use oracle.jdbc.OracleOpaque interface for declaration instead of using concrete class oracle.sql.OPAQUE.
    A class for opaque data type. Use OracleOpaque interface for declaration instead of using concrete class oracle.sql.OPAQUE. oracle.jdbc.OracleOpaque has methods declared for all opertions.

    Obtaining an OracleOpaque from OracleResultSet

    oracle.jdbc.OracleOpaque opaque = ((OracleResultSet)resultSet).getOPAQUE(...);
    Since:
    8.2
    See Also:
    OracleOpaque, Serialized Form
    • Constructor Detail

      • OPAQUE

        public OPAQUE​(OpaqueDescriptor type,
                      Connection conn,
                      Object value)
               throws SQLException
        Deprecated.
        Constructor. The raw bytes are computed at this time or a copy of attributes is made. In any event the caller is free to modify the array without affecting the values held in the OPAQUE.
        Parameters:
        type - the SQLStructType used to convert the type to
        attributes - the array specifying the attributes to be converted to raw bytes.
        Throws:
        SQLException
        See Also:
        oracle.sql.SQLStructType
    • Method Detail

      • getSQLTypeName

        public String getSQLTypeName()
                              throws SQLException
        Deprecated.
        Implements the Struct interface function Retrieves the SQL type name of the SQL structured type that this Struct object represents.
        Specified by:
        getSQLTypeName in interface OracleOpaque
        Returns:
        the fully-qualified type name of the SQL structured type for which this Struct object is the generic representation
        Throws:
        SQLException - if a database access error occurs
      • stringValue

        public String stringValue()
                           throws SQLException
        Deprecated.
        Description copied from class: Datum
        Convert to a String representation of the datum object
        Specified by:
        stringValue in interface oracle.jdbc.internal.OracleDatumWithConnection
        Overrides:
        stringValue in class Datum
        Returns:
        String representation of the datum object
        Throws:
        SQLException
      • getDescriptor

        public OpaqueDescriptor getDescriptor()
                                       throws SQLException
        Deprecated.
        Oracle extension. Return the OpaqueDescriptor object that contains the type information.
        Specified by:
        getDescriptor in interface oracle.jdbc.internal.OracleOpaque
        Returns:
        the type descriptor
        Throws:
        SQLException
      • getBytesValue

        public byte[] getBytesValue()
                             throws SQLException
        Deprecated.
        Return a byte array that represents the attributes into the format that is actually used in the database.
        Specified by:
        getBytesValue in interface oracle.jdbc.internal.OracleOpaque
        Returns:
        a byte array that represents the opaque value
        Throws:
        SQLException
      • isConvertibleTo

        public boolean isConvertibleTo​(Class<?> jClass)
        Deprecated.
        Determines if datum object can be converted to a particular class
        Specified by:
        isConvertibleTo in interface oracle.jdbc.internal.OracleDatumWithConnection
        Specified by:
        isConvertibleTo in interface oracle.jdbc.internal.OracleOpaque
        Specified by:
        isConvertibleTo in class Datum
        Parameters:
        cls - Class to convert to
        Returns:
        true, if conversion to cls is permitted false, if conversion to cls is not permitted
      • toJdbc

        public Object toJdbc()
                      throws SQLException
        Deprecated.
        Returns the JDBC representation of the datum object
        Specified by:
        toJdbc in interface oracle.jdbc.internal.OracleDatumWithConnection
        Specified by:
        toJdbc in interface oracle.jdbc.internal.OracleOpaque
        Specified by:
        toJdbc in class Datum
        Returns:
        an object containing the JDBC value
        Throws:
        SQLException - if conversion to JDBC representation results in an error
      • getJavaSqlConnection

        public Connection getJavaSqlConnection()
                                        throws SQLException
        Deprecated.
        Description copied from class: DatumWithConnection
        Oracle extension Return the java.sql.Connection associated with the receiver. Since 9.0.0 not all Oracle JDBC connection objects are assignment compatible with oracle.jdbc.driver.OracleConnection. If the connection is wrapped, return the outermost wrapper.
        Specified by:
        getJavaSqlConnection in interface oracle.jdbc.internal.OracleDatumWithConnection
        Specified by:
        getJavaSqlConnection in interface oracle.jdbc.internal.OracleOpaque
        Overrides:
        getJavaSqlConnection in class DatumWithConnection
        Returns:
        the connection
        Throws:
        SQLException - if an error occurs