Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Array

public interface Array

java.sql.Array


A Java representation of the SQL ARRAY type.

Summary

Public methods

abstract void free()

Frees any resources held by this array.

abstract Object getArray(long index, int count, Map<StringClass<?>> map)

Returns part of the SQL ARRAY associated with this array, starting at a particular index and comprising up to count successive elements of the SQL array.

abstract Object getArray()

Retrieves the contents of the SQL ARRAY value as a Java array object.

abstract Object getArray(Map<StringClass<?>> map)

Returns the data from the underlying SQL ARRAY as a Java array.

abstract Object getArray(long index, int count)

Returns part of the SQL ARRAY associated with this array, starting at a particular index and comprising up to count successive elements of the SQL array.

abstract int getBaseType()

Returns the JDBC type of the entries in this array's underlying SQL array.

abstract String getBaseTypeName()

Returns the SQL type name of the entries in this array's underlying SQL array.

abstract ResultSet getResultSet()

Returns a ResultSet object which holds the entries of the SQL ARRAY associated with this array.

abstract ResultSet getResultSet(long index, int count, Map<StringClass<?>> map)

Returns a ResultSet object that holds the entries of a subarray, beginning at a particular index and comprising up to count successive entries.

abstract ResultSet getResultSet(Map<StringClass<?>> map)

Returns a ResultSet object which holds the entries of the SQL ARRAY associated with this array.

abstract ResultSet getResultSet(long index, int count)

Returns a ResultSet object that holds the entries of a subarray, beginning at a particular index and comprising up to count successive entries.

Public methods

free

Added in API level 9
void free ()

Frees any resources held by this array. After free is called, calling method other than free will throw SQLException (calling free repeatedly will do nothing).

Throws
SQLException

getArray

Added in API level 1
Object getArray (long index, 
                int count, 
                Map<StringClass<?>> map)

Returns part of the SQL ARRAY associated with this array, starting at a particular index and comprising up to count successive elements of the SQL array.

Parameters
index long: the start position in the array where the values are retrieved.
count int: the number of elements to retrieve.
map Map: the map defining the correspondence between SQL type names and Java types.
Returns
Object A Java array containing the desired set of elements from this Array
Throws
SQLException if there is a database error.

getArray

Added in API level 1
Object getArray ()

Retrieves the contents of the SQL ARRAY value as a Java array object.

Returns
Object A Java array containing the elements of this Array
Throws
SQLException if there is a database error.

getArray

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

Returns the data from the underlying SQL ARRAY as a Java array.

Parameters
map Map: the map defining the correspondence between SQL type names and Java types.
Returns
Object A Java array containing the elements of this array
Throws
SQLException if there is a database error.

getArray

Added in API level 1
Object getArray (long index, 
                int count)

Returns part of the SQL ARRAY associated with this array, starting at a particular index and comprising up to count successive elements of the SQL array.

Parameters
index long: the start position in the array where the values are retrieved.
count int: the number of elements to retrieve.
Returns
Object A Java array containing the desired set of elements from this Array
Throws
SQLException if there is a database error.

getBaseType

Added in API level 1
int getBaseType ()

Returns the JDBC type of the entries in this array's underlying SQL array.

Returns
int An integer constant from the java.sql.Types class
Throws
SQLException if there is a database error.

getBaseTypeName

Added in API level 1
String getBaseTypeName ()

Returns the SQL type name of the entries in this array's underlying SQL array.

Returns
String The database specific name or a fully-qualified SQL type name.
Throws
SQLException if there is a database error.

getResultSet

Added in API level 1
ResultSet getResultSet ()

Returns a ResultSet object which holds the entries of the SQL ARRAY associated with this array.

Returns
ResultSet the elements of the array as a ResultSet.
Throws
SQLException if there is a database error.

getResultSet

Added in API level 1
ResultSet getResultSet (long index, 
                int count, 
                Map<StringClass<?>> map)

Returns a ResultSet object that holds the entries of a subarray, beginning at a particular index and comprising up to count successive entries.

Parameters
index long: the start position in the array where the values are retrieved.
count int: the number of elements to retrieve.
map Map: the map defining the correspondence between SQL type names and Java types.
Returns
ResultSet the ResultSet the array's custom type values. if a database error has occurred.
Throws
SQLException if there is a database error.

getResultSet

Added in API level 1
ResultSet getResultSet (Map<StringClass<?>> map)

Returns a ResultSet object which holds the entries of the SQL ARRAY associated with this array.

Parameters
map Map: the map defining the correspondence between SQL type names and Java types.
Returns
ResultSet the array as a ResultSet.
Throws
SQLException if there is a database error.

getResultSet

Added in API level 1
ResultSet getResultSet (long index, 
                int count)

Returns a ResultSet object that holds the entries of a subarray, beginning at a particular index and comprising up to count successive entries.

Parameters
index long: the start position in the array where the values are retrieved.
count int: the number of elements to retrieve.
Returns
ResultSet the elements of the array as a ResultSet.
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.