Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Ref

public interface Ref

java.sql.Ref


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<StringClass<?>> 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

getBaseTypeName

Added in API level 1
String getBaseTypeName ()

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

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

getObject

Added in API level 1
Object getObject ()

Gets the SQL structured type instance referenced by this Ref.

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

getObject

Added in API level 1
Object getObject (Map<StringClass<?>> map)

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

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

setObject

Added in API level 1
void setObject (Object value)

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

Parameters
value Object: the Object representing the new SQL structured type that this Ref references.
Throws
SQLException if there is a database error.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.