Skip navigation links

Oracle®Database JDBC Java API Reference
12c Release 1 (12.1.0.2)
E56669-01


oracle.sql
Class REF

java.lang.Object
  extended by oracle.sql.Datum
      extended by oracle.sql.DatumWithConnection
          extended by oracle.sql.REF

All Implemented Interfaces:
Serializable, Cloneable, Ref, oracle.jdbc.internal.ACProxyable, oracle.jdbc.internal.OracleDatumWithConnection, OracleRef

Deprecated. Use java.sql.Ref interface for declaration instead of using concrete class oracle.sql.REF.

public class REF
extends DatumWithConnection
implements oracle.jdbc.internal.OracleRef, Serializable, Cloneable

The REF class is a representation of the Oracle REF datatype, and it implements the java.sql.Ref interface. Use Ref interface for declaration instead of using concrete class oracle.sql.REF. java.sql.Ref has methods declared for all opertions. For Oracle specific methods use the interface OracleRef.

Obtaining java.sql.Ref from ResultSet

java.sql.Ref ref = resultSet.getRef(...); There is no way to create Ref on the client side.

See Also:
Ref, OracleRef, Serialized Form

Field Summary
static boolean TRACE
          Deprecated.  

 

Method Summary
 Object clone()
          Deprecated.  
 boolean equals(Object obj)
          Deprecated. Test any object for equality with an Datum.
 Object getACProxy()
          Deprecated.  
 String getBaseTypeName()
          Deprecated. Implements the Ref interface method.
 StructDescriptor getDescriptor()
          Deprecated. Oracle extension.
 Connection getJavaSqlConnection()
          Deprecated. Oracle extension Return the java.sql.Connection associated with the receiver.
 Object getObject()
          Deprecated. JDBC 3.0 Retrieves the SQL structured type instance referenced by this Ref object.
 Object getObject(Map map)
          Deprecated.  
 OracleTypeMetaData getOracleMetaData()
          Deprecated. Return the type data for this object
 String getSQLTypeName()
          Deprecated. Oracle extension.
 STRUCT getSTRUCT()
          Deprecated. Oracle extension.
 Object getValue()
          Deprecated. Oracle extension.
 Object getValue(Map map)
          Deprecated. Oracle extension.
 int hashCode()
          Deprecated.  
 boolean isConvertibleTo(Class jClass)
          Deprecated. Test whether this data object can be converted to the specified Java data type.
 void setACProxy(Object w)
          Deprecated.  
 void setObject(Object value)
          Deprecated. JDBC 3.0 Sets the structured type value that this Ref object references to the given instance of Object.
 void setValue(Object value)
          Deprecated. Oracle extension.
 Object toClass(Class clazz, Map map)
          Deprecated. Returns the required object based on the class to which the SQL structured type is mapped to.
 Object toJdbc()
          Deprecated. Convert this data object into its default Java object type.
 Object toJdbc(Map map)
          Deprecated. Convert this data object into the Java object as defined in map if the data object type is not mapped to any class then its converted into default Java object type

 

Methods inherited from class oracle.sql.DatumWithConnection
assertNotNull, assertNotNull, getConnection, getConnectionDuringExceptionHandling, getOracleConnection

 

Methods inherited from class oracle.sql.Datum
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, bytesEqual, byteValue, characterStreamValue, compareBytes, dateValue, doubleValue, floatValue, getBytes, getLength, getStream, intValue, isNull, longValue, setBytes, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue, toClass

 

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface oracle.jdbc.internal.OracleDatumWithConnection
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, floatValue, getBytes, getConnection, getInternalConnection, getLength, getOracleConnection, getStream, intValue, longValue, setBytes, setPhysicalConnectionOf, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue

 

Field Detail

TRACE

public static final boolean TRACE
Deprecated. 
See Also:
Constant Field Values

Method Detail

getBaseTypeName

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

getValue

public Object getValue(Map map)
                throws SQLException
Deprecated. 
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.
Throws:
SQLException

getValue

public Object getValue()
                throws SQLException
Deprecated. 
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.
Throws:
SQLException

getSTRUCT

public STRUCT getSTRUCT()
                 throws SQLException
Deprecated. 
Oracle extension. Get the referenced object as a STRUCT instance. Customized type mapping is ignored.
Throws:
SQLException

setValue

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

getOracleMetaData

public OracleTypeMetaData getOracleMetaData()
                                     throws SQLException
Deprecated. 
Return the type data for this object
Specified by:
getOracleMetaData in interface OracleRef
Returns:
type metadata
Throws:
SQLException - if an error occurs
Since:
11.2.0.3.0

getDescriptor

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

getSQLTypeName

public String getSQLTypeName()
                      throws SQLException
Deprecated. 
Oracle extension. Return the type name of the ADT type that this REF object points to.
Throws:
SQLException

getObject

public Object getObject(Map map)
                 throws SQLException
Deprecated. 
Specified by:
getObject in interface Ref
Throws:
SQLException

getObject

public Object getObject()
                 throws SQLException
Deprecated. 
JDBC 3.0 Retrieves the SQL structured type instance referenced by this Ref object. If the connection's type map has an entry for the structured type, the instance will be custom mapped to the Java class indicated in the type map. Otherwise, the structured type instance will be mapped to a Struct object.
Specified by:
getObject in interface Ref
Returns:
a Java Object that is the mapping for the SQL structured type to which this Ref object refers
Throws:
SQLException - if a database access error occurs
Since:
9.0.2
See Also:
setObject(java.lang.Object)

setObject

public void setObject(Object value)
               throws SQLException
Deprecated. 
JDBC 3.0 Sets the structured type value that this Ref object references to the given instance of Object. The driver converts this to an SQL structured type when it sends it to the database.
Specified by:
setObject in interface Ref
Parameters:
value - an Object representing the SQL structured type instance that this Ref object will reference
Throws:
SQLException - if a database access error occurs
Since:
10R1
See Also:
getObject(), getObject(Map), PreparedStatement.setObject(int, Object), PreparedStatement#setObject(String, Object)

toJdbc

public Object toJdbc()
              throws SQLException
Deprecated. 
Convert this data object into its default Java object type.
Specified by:
toJdbc in interface oracle.jdbc.internal.OracleDatumWithConnection
Specified by:
toJdbc in class Datum
Returns:
this object.
Throws:
SQLException - if any of the lower layer code throws an exception.

toJdbc

public Object toJdbc(Map map)
              throws SQLException
Deprecated. 
Convert this data object into the Java object as defined in map if the data object type is not mapped to any class then its converted into default Java object type
Parameters:
map - connection type map
Returns:
jdbcObject
Throws:
SQLException

toClass

public Object toClass(Class clazz,
                      Map map)
               throws SQLException
Deprecated. 
Returns the required object based on the class to which the SQL structured type is mapped to.
Throws:
SQLException

isConvertibleTo

public boolean isConvertibleTo(Class jClass)
Deprecated. 
Test whether this data object can be converted to the specified Java data type.
Specified by:
isConvertibleTo in interface oracle.jdbc.internal.OracleDatumWithConnection
Specified by:
isConvertibleTo in class Datum
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.

clone

public Object clone()
             throws CloneNotSupportedException
Deprecated. 
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

equals

public boolean equals(Object obj)
Deprecated. 
Description copied from class: Datum
Test any object for equality with an Datum. Datums are equal if they are of the same class and their bytes are the same.
Overrides:
equals in class Datum
Parameters:
obj - object to compare this with
Returns:
true if the class of this is the same as the class of obj and the byte representation of this is the same as the byte representation of obj.

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class Object

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
Overrides:
getJavaSqlConnection in class DatumWithConnection
Returns:
the connection
Throws:
SQLException - if an error occurs

setACProxy

public void setACProxy(Object w)
Deprecated. 
Specified by:
setACProxy in interface oracle.jdbc.internal.ACProxyable

getACProxy

public Object getACProxy()
Deprecated. 
Specified by:
getACProxy in interface oracle.jdbc.internal.ACProxyable

Skip navigation links

Oracle®Database JDBC Java API Reference
12c Release 1 (12.1.0.2)
E56669-01


Copyright © 2008, 2014, Oracle and/or its affiliates. All rights reserved.