Package oracle.jdbc
Interface OracleArray
- All Superinterfaces:
Array
- All Known Implementing Classes:
ARRAY
This interface defines the Oracle extensions to the standard JDBC interface
Array.
Generally any new code should avoid the direct use of the class ARRAY.
For variable declarations use the interface Array or this interface as required.
For creating a OracleArray use OracleConnection.createOracleArray(java.lang.String, java.lang.Object).
- Since:
- 11.2.0.3.0
-
Method Summary
Modifier and TypeMethodDescriptiondouble[]Oracle extension.double[]getDoubleArray(long index, int count) Oracle extension.float[]Oracle extension.float[]getFloatArray(long index, int count) Oracle extension.int[]Oracle extension.int[]getIntArray(long index, int count) Oracle extension.Map<?,?> Analogous to getArray except that it returns indices and elements of the SQL associative array as java.util.Map.long[]Oracle extension.long[]getLongArray(long index, int count) Oracle extension.Oracle extension.short[]Oracle extension.short[]getShortArray(long index, int count) Oracle extension.intlength()Oracle extension.toJdbc()Oracle extension.Methods inherited from interface java.sql.Array
free, getArray, getArray, getArray, getArray, getBaseType, getBaseTypeName, getResultSet, getResultSet, getResultSet, getResultSet
-
Method Details
-
getOracleMetaData
Oracle extension. Get the SQL ARRAY type metadata for the type of this object.- Returns:
- metadata for this object's type
- Throws:
SQLException- if an error occurs
-
length
Oracle extension. Get array size.- Returns:
- the number of elements in the array.
- Throws:
SQLException
-
getSQLTypeName
Oracle extension. Retrieves the SQL type name of the SQL structured type that thisStructobject represents.- Returns:
- the fully-qualified type name of the SQL collection
type for which this
Arrayobject is the generic representation - Throws:
SQLException- if a database access error occurs
-
toJdbc
Oracle extension. Returns the JDBC representation of the datum object- Returns:
- an object containing the JDBC value
- Throws:
SQLException- if conversion to JDBC representation results in an error
-
getIntArray
Oracle extension. Analogous to getArray except that it always returns an int[].- Returns:
- an array of int.
- Throws:
SQLException
-
getIntArray
Oracle extension. Like getIntArray, but returns a slice.- Parameters:
index- the index of the first element to be returnedcount- the number of elements to be returned.- Returns:
- an array containing count elements starting at index
- Throws:
SQLException
-
getDoubleArray
Oracle extension. Analogous to getArray except that it always returns a double[].- Returns:
- an array of double.
- Throws:
SQLException
-
getDoubleArray
Oracle extension. Like getDoubleArray, but returns a slice.- Parameters:
index- the index of the first element to be returnedcount- the number of elements to be returned.- Returns:
- an array containing count elements starting at index
- Throws:
SQLException
-
getShortArray
Oracle extension. Analogous to getArray except that it always returns a short[].- Returns:
- an array of short.
- Throws:
SQLException
-
getShortArray
- Throws:
SQLException
-
getLongArray
Oracle extension. Analogous to getArray except that it always returns a long[].- Returns:
- an array of long.
- Throws:
SQLException
-
getLongArray
Oracle extension. Like getLongArray, but returns a slice.- Parameters:
index- the index of the first element to be returnedcount- the number of elements to be returned.- Returns:
- an array containing count elements starting at index
- Throws:
SQLException
-
getFloatArray
Oracle extension. Analogous to getArray except that it always returns a float[].- Returns:
- an array of float.
- Throws:
SQLException
-
getFloatArray
Oracle extension. Like getFloatArray, but returns a slice.- Parameters:
index- the index of the first element to be returnedcount- the number of elements to be returned.- Returns:
- an array containing count elements starting at index
- Throws:
SQLException
-
getJavaMap
Analogous to getArray except that it returns indices and elements of the SQL associative array as java.util.Map. For non SQL associative array types (such as VARRAY or NESTED TABLE) this method returns null.- Returns:
- a Map containing indices and elements of the SQL associative array
- Throws:
SQLException
-