|
Oracle® Database JDBC Java API Reference 11g Release 2 ("11.2.0.0.1-Beta-1") BETA E13995-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.sql.Datum
oracle.sql.DatumWithConnection
oracle.sql.ARRAY
public class ARRAY
An Oracle implementation for generic JDBC Array interface.
Field Summary | |
---|---|
static int |
ACCESS_FORWARD |
static int |
ACCESS_REVERSE |
static int |
ACCESS_UNKNOWN |
static java.lang.String |
BUILD_DATE |
static boolean |
PRIVATE_TRACE |
static boolean |
TRACE |
Constructor Summary | |
---|---|
ARRAY(ArrayDescriptor type, java.sql.Connection conn, java.lang.Object elements) Constructor. |
Method Summary | |
---|---|
java.lang.String |
dump() Create a string which show the contents of this Array and of all its component parts. |
int |
getAccessDirection() Performance hint. |
java.lang.Object |
getArray() Implements Array interface method Retrieve the contents of the SQL array designated by the object. |
java.lang.Object |
getArray(long index, int count) Implements Array interface method Like getArray() above, but returns an array containing a slice of the SQL array, beginning with the given index and containing up to count successive elements of the SQL array. |
java.lang.Object |
getArray(long index, int count, java.util.Map map) Implements Array interface method Like getArray() above, but returns an array containing a slice of the SQL array, beginning with the given index and containing up to count successive elements of the SQL array. |
java.lang.Object |
getArray(java.util.Map map) Implements Array interface method Retrieve the contents of the SQL array designated by this object. |
boolean |
getAutoBuffering() Performance hint. |
boolean |
getAutoIndexing() Performance hint. |
int |
getBaseType() Implements Array interface method Determine the code, from java.sql.Types, of the type of the elements of the array. |
java.lang.String |
getBaseTypeName() Implements Array interface method Returns the SQL type name of the elements in the array designated by this Array object. |
ArrayDescriptor |
getDescriptor() Oracle extension. |
double[] |
getDoubleArray() Oracle extension. |
double[] |
getDoubleArray(long index, int count) Oracle extension. |
float[] |
getFloatArray() Oracle extension. |
float[] |
getFloatArray(long index, int count) Oracle extension. |
int[] |
getIntArray() Oracle extension. |
int[] |
getIntArray(long index, int count) Oracle extension. |
long[] |
getLongArray() Oracle extension. |
long[] |
getLongArray(long index, int count) Oracle extension. |
Datum[] |
getOracleArray() Oracle extension. |
Datum[] |
getOracleArray(long index, int count) Oracle extension. |
java.sql.ResultSet |
getResultSet() Implements Array interface method Returns a result set that contains the elements of the array designated by this Array object. |
java.sql.ResultSet |
getResultSet(long index, int count) Implements Array interface method Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements. |
java.sql.ResultSet |
getResultSet(long index, int count, java.util.Map map) Implements Array interface method Returns a result set holding the elements of the subarray that starts at index index and contains up to count successive elements. |
java.sql.ResultSet |
getResultSet(java.util.Map map) Implements Array interface method Returns a result set that contains the elements of the array designated by this Array object and uses the given map to map the array elements. |
short[] |
getShortArray() Oracle extension. |
short[] |
getShortArray(long index, int count) |
java.lang.String |
getSQLTypeName() Oracle extension. |
boolean |
isConvertibleTo(java.lang.Class jClass) Oracle extension. |
int |
length() Oracle extension. |
void |
setAutoBuffering(boolean enable) Performance hint. |
void |
setAutoIndexing(boolean enable) Performance hint. |
void |
setAutoIndexing(boolean enable, int direction) Performance hint. |
java.lang.Object |
toJdbc() Oracle extension. |
Methods inherited from class oracle.sql.DatumWithConnection |
---|
assertNotNull, assertNotNull, getConnection, getJavaSqlConnection, getOracleConnection |
Methods inherited from class oracle.sql.Datum |
---|
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, longValue, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timeValue |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.Array |
---|
free |
Field Detail |
---|
public static final int ACCESS_FORWARD
public static final int ACCESS_REVERSE
public static final int ACCESS_UNKNOWN
public static final java.lang.String BUILD_DATE
public static final boolean TRACE
public static final boolean PRIVATE_TRACE
Constructor Detail |
---|
public ARRAY(ArrayDescriptor type, java.sql.Connection conn, java.lang.Object elements) throws java.sql.SQLException
type
- an ArrayDescriptor describing the SQL Typeelements
- the contents of the array. These objects will be converted to raw bytes of the appropriate SQL Typejava.sql.SQLException
Method Detail |
---|
public java.lang.String getBaseTypeName() throws java.sql.SQLException
Array
object. If the elements are a built-in type, it returns the database-specific type name of the elements. If the elements are a user-defined type (UDT), this method returns the fully-qualified SQL type name.getBaseTypeName
in interface java.sql.Array
String
that is the database-specific name for a built-in base type or the fully-qualified SQL type name for a base type that is a UDTjava.sql.SQLException
- if an error occurs while attempting to access the type namepublic int getBaseType() throws java.sql.SQLException
getBaseType
in interface java.sql.Array
java.sql.SQLException
Types
, oracle.jdbc.driver.OracleTypes
public java.lang.Object getArray() throws java.sql.SQLException
getArray
in interface java.sql.Array
java.sql.SQLException
public java.lang.Object getArray(java.util.Map map) throws java.sql.SQLException
getArray
in interface java.sql.Array
map
- contains mapping of SQL type names to Java classesjava.sql.SQLException
public java.lang.Object getArray(long index, int count) throws java.sql.SQLException
getArray
in interface java.sql.Array
index
- the array-index of the first element to retrievecount
- the number of successive SQL array elements to retrievejava.sql.SQLException
public java.lang.Object getArray(long index, int count, java.util.Map map) throws java.sql.SQLException
getArray
in interface java.sql.Array
index
- the array-index of the first element to retrievecount
- the number of successive SQL array elements to retrievemap
- contains mapping of SQL user-defined types to classesjava.sql.SQLException
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
Array
object. If appropriate, the elements of the array are mapped using the connection's type map; otherwise, the standard mapping is used.
The result set contains one row for each array element, with two columns in each row. The second column stores the element value; the first column stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the order of the indices.
getResultSet
in interface java.sql.Array
ResultSet
object containing one row for each of the elements in the array designated by this Array
object, with the rows in ascending order based on the indices.java.sql.SQLException
- if an error occurs while attempting to access the arraypublic java.sql.ResultSet getResultSet(java.util.Map map) throws java.sql.SQLException
Array
object and uses the given map
to map the array elements. If the base type of the array does not match a user-defined type in map
, the standard mapping is used instead.
The result set contains one row for each array element, with two columns in each row. The second column stores the element value; the first column stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the order of the indices.
getResultSet
in interface java.sql.Array
map
- contains mapping of SQL user-defined types to classes in the Java(tm) programming languageResultSet
object containing one row for each of the elements in the array designated by this Array
object, with the rows in ascending order based on the indices.java.sql.SQLException
- if an error occurs while attempting to access the arraypublic java.sql.ResultSet getResultSet(long index, int count) throws java.sql.SQLException
index
and contains up to count
successive elements. This method uses the connection's type map to map the elements of the array if the map contains an entry for the base type. Otherwise, the standard mapping is used.
The result set has one row for each element of the SQL array designated by this object, with the first row containing the element at index index
. The result set has up to count
rows in ascending order based on the indices. Each row has two columns: The second column stores the element value; the first column stroes the index into the array for that element.
getResultSet
in interface java.sql.Array
index
- the array index of the first element to retrieve; the first element is at index 1count
- the number of successive SQL array elements to retrieveResultSet
object containing up to count
consecutive elements of the SQL array designated by this Array
object, starting at index index
.java.sql.SQLException
- if an error occurs while attempting to access the arraypublic java.sql.ResultSet getResultSet(long index, int count, java.util.Map map) throws java.sql.SQLException
index
and contains up to count
successive elements. This method uses the Map
object map
to map the elements of the array unless the base type of the array does not match a user-defined type in map
, in which case it uses the standard mapping.
The result set has one row for each element of the SQL array designated by this object, with the first row containing the element at index index
. The result set has up to count
rows in ascending order based on the indices. Each row has two columns: The second column stores the element value; the first column stroes the index into the array for that element.
getResultSet
in interface java.sql.Array
index
- the array index of the first element to retrieve; the first element is at index 1count
- the number of successive SQL array elements to retrievemap
- the Map
object that contains the mapping of SQL type names to classes in the Java(tm) programming languageResultSet
object containing up to count
consecutive elements of the SQL array designated by this Array
object, starting at index index
.java.sql.SQLException
- if an error occurs while attempting to access the arraypublic Datum[] getOracleArray() throws java.sql.SQLException
java.sql.SQLException
public int length() throws java.sql.SQLException
java.sql.SQLException
public Datum[] getOracleArray(long index, int count) throws java.sql.SQLException
index
- the index of the first element to be returnedcount
- the number of elements to be returned.java.sql.SQLException
public java.lang.String getSQLTypeName() throws java.sql.SQLException
Struct
object represents.java.sql.SQLException
- if a database access error occurspublic ArrayDescriptor getDescriptor() throws java.sql.SQLException
java.sql.SQLException
public java.lang.Object toJdbc() throws java.sql.SQLException
toJdbc
in class Datum
java.sql.SQLException
- if conversion to JDBC representation results in an errorpublic boolean isConvertibleTo(java.lang.Class jClass)
isConvertibleTo
in class Datum
jClass
- Class to convert topublic int[] getIntArray() throws java.sql.SQLException
java.sql.SQLException
public int[] getIntArray(long index, int count) throws java.sql.SQLException
index
- the index of the first element to be returnedcount
- the number of elements to be returned.java.sql.SQLException
public double[] getDoubleArray() throws java.sql.SQLException
java.sql.SQLException
public double[] getDoubleArray(long index, int count) throws java.sql.SQLException
index
- the index of the first element to be returnedcount
- the number of elements to be returned.java.sql.SQLException
public short[] getShortArray() throws java.sql.SQLException
java.sql.SQLException
public short[] getShortArray(long index, int count) throws java.sql.SQLException
java.sql.SQLException
public long[] getLongArray() throws java.sql.SQLException
java.sql.SQLException
public long[] getLongArray(long index, int count) throws java.sql.SQLException
index
- the index of the first element to be returnedcount
- the number of elements to be returned.java.sql.SQLException
public float[] getFloatArray() throws java.sql.SQLException
java.sql.SQLException
public float[] getFloatArray(long index, int count) throws java.sql.SQLException
index
- the index of the first element to be returnedcount
- the number of elements to be returned.java.sql.SQLException
public void setAutoBuffering(boolean enable) throws java.sql.SQLException
enable
- - true enables auto-buffering; false disables auto-bufferingjava.sql.SQLException
getAutoBuffering()
public boolean getAutoBuffering() throws java.sql.SQLException
java.sql.SQLException
setAutoBuffering(boolean)
public void setAutoIndexing(boolean enable, int direction) throws java.sql.SQLException
enable
- - true enables auto-indexing; false disables auto-indexingdirection
- - overwrite default access direction.java.sql.SQLException
public void setAutoIndexing(boolean enable) throws java.sql.SQLException
enable
- - true enables auto-indexing; false disables auto-indexingjava.sql.SQLException
public boolean getAutoIndexing() throws java.sql.SQLException
java.sql.SQLException
oracle.sql.ARRAY#setAutoIndexinging(boolean)
, oracle.sql.ARRAY#setAutoIndexinging(boolean, int)
public int getAccessDirection() throws java.sql.SQLException
java.sql.SQLException
oracle.sql.ARRAY#setAutoIndexinging(boolean)
, oracle.sql.ARRAY#setAutoIndexinging(boolean, int)
public java.lang.String dump() throws java.sql.SQLException
java.sql.SQLException
|
Oracle® Database JDBC Java API Reference 11g Release 2 ("11.2.0.0.1-Beta-1") BETA E13995-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |