oracle.sql
Class REF

java.lang.Object
  |
  +--oracle.sql.Datum
        |
        +--oracle.sql.REF

public class REF
extends Datum
implements java.sql.Ref, java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getBaseTypeName()
          Implements the Ref interface method.
 OracleConnection getConnection()
          Deprecated. since 9.0.0. Use getJavaSqlConnection() instead.
 StructDescriptor getDescriptor()
          Oracle extension.
 java.sql.Connection getJavaSqlConnection()
          Oracle extension Return the java.sql.Connection associated with the receiver.
 java.lang.String getSQLTypeName()
          Oracle extension.
 STRUCT getSTRUCT()
          Oracle extension.
 java.lang.Object getValue()
          Oracle extension.
 java.lang.Object getValue(java.util.Map map)
          Oracle extension.
 int hashCode()
           
 boolean isConvertibleTo(java.lang.Class jClass)
          Test whether this data object can be converted to the specified Java data type.
 void setConnection(java.sql.Connection conn)
          Oracle extension.
 void setValue(java.lang.Object value)
          Oracle extension.
 java.lang.Object toJdbc()
          Convert this data object into its default Java object type.
 
Methods inherited from class oracle.sql.Datum
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, floatValue, getBytes, getLength, getStream, intValue, longValue, makeJdbcArray, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timeValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBaseTypeName

public java.lang.String getBaseTypeName()
                                 throws java.sql.SQLException
Implements the Ref interface method. Gets the fully-qualified SQL structured type name of the referenced item.
Specified by:
getBaseTypeName in interface java.sql.Ref
Returns:
fully-qualified SQL structured type name of the referenced item.
Throws:
java.sql.SQLException - if a database access error occurs

getValue

public java.lang.Object getValue(java.util.Map map)
                          throws java.sql.SQLException
Oracle extension. Get referenced object. Use "map" for customized type mapping.
Parameters:
map - contains mapping of SQL type names to Java classes
Returns:
the referenced object which can be a STRUCT or any java object defined in type map.

getValue

public java.lang.Object getValue()
                          throws java.sql.SQLException
Oracle extension. Get referenced object. Use the connection type map for customized type mapping.
Returns:
the referenced object which can be a STRUCT or any java object defined in type map.

getSTRUCT

public STRUCT getSTRUCT()
                 throws java.sql.SQLException
Oracle extension. Get the referenced object as a oracle.sql.STRUCT instance. Customized type mapping is ignored.

setValue

public void setValue(java.lang.Object value)
              throws java.sql.SQLException
Oracle extension. Set REF value. The method updated the underly object value in database.
Parameters:
value - the value to be set.

getDescriptor

public StructDescriptor getDescriptor()
                               throws java.sql.SQLException
Oracle extension. Return the type descriptor of the ADT type that this REF object points to.

getSQLTypeName

public java.lang.String getSQLTypeName()
                                throws java.sql.SQLException
Oracle extension. Return the type name of the ADT type that this REF object points to.

getJavaSqlConnection

public java.sql.Connection getJavaSqlConnection()
                                         throws java.sql.SQLException
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.
Returns:
the connection
Throws:
java.sql.SQLException - if an error occurs
Since:
9.0.0

getConnection

public OracleConnection getConnection()
                               throws java.sql.SQLException
Deprecated. since 9.0.0. Use getJavaSqlConnection() instead.
Oracle extension. The OracleConnection object associated with the array.
Returns:
the connection if it is assignment compatible with oracle.jdbc.driver.OracleConnection
Throws:
java.sql.SQLException - if the connection is not assignment compatible

setConnection

public void setConnection(java.sql.Connection conn)
                   throws java.sql.SQLException
Oracle extension. Set current connection.

toJdbc

public java.lang.Object toJdbc()
                        throws java.sql.SQLException
Convert this data object into its default Java object type.
Returns:
this object.
Throws:
java.sql.SQLException - if any of the lower layer code throws an exception.
Overrides:
toJdbc in class Datum

isConvertibleTo

public boolean isConvertibleTo(java.lang.Class jClass)
Test whether this data object can be converted to the specified Java data type.
Parameters:
jClass - specifies the Java data type to test against.
Returns:
true if this data object is convertible to the specified Java class, and a corresponding xxxValue() method is available; otherwise, a false is returned.
Overrides:
isConvertibleTo in class Datum

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Datum

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object