Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
Added in API level 1
public interface

Ref

java.sql.Ref

Class Overview

This interface represents an SQL Ref - a data object containing a cursor or pointer to a result table.

The data structure identified by an instance of Ref is held in the database, so the data is not necessarily read and converted into a Java object until getObject is called. However, if the database supports the Ref type, it is not typically necessary to get the underlying object before using it in a method call - the Ref object can be used in place of the data structure.

A Ref object is stored into the database using the setRef(int, Ref) method.

Summary

Public Methods
abstract String getBaseTypeName ()
Gets the fully-qualified SQL name of the SQL structured type that this Ref references.
abstract Object getObject ()
Gets the SQL structured type instance referenced by this Ref .
abstract Object >)">getObject ( Map < String Class <?>> map)
Returns the associated object and uses the relevant mapping to convert it to a Java type.
abstract void setObject ( Object value)
Sets the value of the structured type that this Ref references to a supplied object.

Public Methods

public abstract String getBaseTypeName ()

Added in API level 1

Gets the fully-qualified SQL name of the SQL structured type that this Ref references.

Returns
  • the fully qualified name of the SQL structured type.
Throws
SQLException if there is a database error.

public abstract Object getObject ()

Added in API level 1

Gets the SQL structured type instance referenced by this Ref .

Returns
  • a Java object whose type is defined by the mapping for the SQL structured type.
Throws
SQLException if there is a database error.
>)">

public abstract Object getObject ( Map < String Class <?>> map)

Added in API level 1

Returns the associated object and uses the relevant mapping to convert it to a Java type.

Parameters
map the mapping for type conversion.
Returns
  • a Java object whose type is defined by the mapping for the SQL structured type.
Throws
SQLException if there is a database error.

public abstract void setObject ( Object value)

Added in API level 1

Sets the value of the structured type that this Ref references to a supplied object.

Parameters
value the Object representing the new SQL structured type that this Ref references.
Throws
SQLException if there is a database error.