|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
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
This class has two roles.
Field Summary | |
---|---|
static int |
ACCESS_FORWARD
|
static int |
ACCESS_REVERSE
|
static int |
ACCESS_UNKNOWN
|
static java.lang.String |
BUILD_DATE
|
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. |
OracleTypeMetaData |
getOracleMetaData()
Return the type data for this object |
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.String |
stringValue()
Convert to a String representation of the datum object |
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, timestampValue, timeValue, timeValue |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jdbc.internal.OracleDatumWithConnection |
---|
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, floatValue, getBytes, getConnection, getInternalConnection, getJavaSqlConnection, getLength, getOracleConnection, getStream, intValue, longValue, setBytes, setPhysicalConnectionOf, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue |
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
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 Type
java.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 UDT
java.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
,
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 classes
java.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 retrieve
java.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 classes
java.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 language
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(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 retrieve
ResultSet
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 language
ResultSet
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
length
in interface OracleArray
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.
getSQLTypeName
in interface OracleArray
java.sql.SQLException
- if a database access error occurspublic OracleTypeMetaData getOracleMetaData() throws java.sql.SQLException
getOracleMetaData
in interface OracleArray
java.sql.SQLException
- if an error occurspublic ArrayDescriptor getDescriptor() throws java.sql.SQLException
java.sql.SQLException
public java.lang.Object toJdbc() throws java.sql.SQLException
toJdbc
in interface oracle.jdbc.internal.OracleDatumWithConnection
toJdbc
in interface OracleArray
toJdbc
in class Datum
java.sql.SQLException
- if conversion to JDBC representation results in
an errorpublic boolean isConvertibleTo(java.lang.Class jClass)
isConvertibleTo
in interface oracle.jdbc.internal.OracleDatumWithConnection
isConvertibleTo
in class Datum
jClass
- Class to convert to
public int[] getIntArray() throws java.sql.SQLException
getIntArray
in interface OracleArray
java.sql.SQLException
public int[] getIntArray(long index, int count) throws java.sql.SQLException
getIntArray
in interface OracleArray
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
getDoubleArray
in interface OracleArray
java.sql.SQLException
public double[] getDoubleArray(long index, int count) throws java.sql.SQLException
getDoubleArray
in interface OracleArray
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
getShortArray
in interface OracleArray
java.sql.SQLException
public short[] getShortArray(long index, int count) throws java.sql.SQLException
getShortArray
in interface OracleArray
java.sql.SQLException
public long[] getLongArray() throws java.sql.SQLException
getLongArray
in interface OracleArray
java.sql.SQLException
public long[] getLongArray(long index, int count) throws java.sql.SQLException
getLongArray
in interface OracleArray
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
getFloatArray
in interface OracleArray
java.sql.SQLException
public float[] getFloatArray(long index, int count) throws java.sql.SQLException
getFloatArray
in interface OracleArray
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-buffering
java.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-indexing
java.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
public java.lang.String stringValue() throws java.sql.SQLException
Datum
stringValue
in interface oracle.jdbc.internal.OracleDatumWithConnection
stringValue
in class Datum
java.sql.SQLException
|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |