Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

oracle.sql
Class ArrayDescriptor

java.lang.Object
  extended by oracle.sql.TypeDescriptor
      extended by oracle.sql.ArrayDescriptor
All Implemented Interfaces:
java.io.Serializable, oracle.jdbc.internal.ObjectData, OracleData, OracleTypeMetaData, OracleTypeMetaData.Array, ORAData

public class ArrayDescriptor
extends TypeDescriptor
implements OracleTypeMetaData.Array, java.io.Serializable

Describes an array class. In Oracle 8 all arrays are named types.

See Also:
ARRAY, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.jdbc.OracleTypeMetaData
OracleTypeMetaData.Array, OracleTypeMetaData.ArrayStorage, OracleTypeMetaData.Kind, OracleTypeMetaData.Opaque, OracleTypeMetaData.Struct
 
Field Summary
static java.lang.String BUILD_DATE
           
static int CACHE_ALL
           
static int CACHE_LAST
           
static int CACHE_NONE
           
static boolean TRACE
           
static int TYPE_NESTED_TABLE
           
static int TYPE_VARRAY
           
 
Fields inherited from class oracle.sql.TypeDescriptor
ANYDATASETTOID, ANYDATATOID, ANYTYPETOID, DEBUG_SERIALIZATION, RAWTOID, TYPECODE_BDOUBLE, TYPECODE_BFILE, TYPECODE_BFLOAT, TYPECODE_BLOB, TYPECODE_BOOLEAN, TYPECODE_CFILE, TYPECODE_CHAR, TYPECODE_CLOB, TYPECODE_DATE, TYPECODE_DECIMAL, TYPECODE_DOUBLE, TYPECODE_ERRHP, TYPECODE_FLOAT, TYPECODE_INTEGER, TYPECODE_INTERVAL_DS, TYPECODE_INTERVAL_YM, TYPECODE_ITABLE, TYPECODE_JDBC_ARRAY, TYPECODE_JDBC_JOBJECT, TYPECODE_JDBC_JOPAQUE, TYPECODE_JDBC_JSTRUCT, TYPECODE_JDBC_REF, TYPECODE_JDBC_STRUCT, TYPECODE_MLSLABEL, TYPECODE_NAMEDCOLLECTION, TYPECODE_NCHAR, TYPECODE_NCLOB, TYPECODE_NONE, TYPECODE_NUMBER, TYPECODE_NVARCHAR2, TYPECODE_OBJECT, TYPECODE_OCTET, TYPECODE_OPAQUE, TYPECODE_OTMFIRST, TYPECODE_OTMLAST, TYPECODE_PLS_INTEGER, TYPECODE_PTR, TYPECODE_RAW, TYPECODE_REAL, TYPECODE_RECORD, TYPECODE_REF, TYPECODE_SIGNED16, TYPECODE_SIGNED32, TYPECODE_SIGNED8, TYPECODE_SMALLINT, TYPECODE_SYSFIRST, TYPECODE_SYSLAST, TYPECODE_TABLE, TYPECODE_TIME, TYPECODE_TIME_TZ, TYPECODE_TIMESTAMP, TYPECODE_TIMESTAMP_LTZ, TYPECODE_TIMESTAMP_TZ, TYPECODE_UNSIGNED16, TYPECODE_UNSIGNED32, TYPECODE_UNSIGNED8, TYPECODE_UROWID, TYPECODE_VARCHAR, TYPECODE_VARCHAR2, TYPECODE_VARRAY, XMLTYPETOID
 
Method Summary
static ArrayDescriptor createDescriptor(oracle.sql.SQLName sqlName, java.sql.Connection conn)
          Descriptor factory.
static ArrayDescriptor createDescriptor(oracle.sql.SQLName sqlName, java.sql.Connection conn, boolean recurse, boolean force)
          Descriptor factory.
static ArrayDescriptor createDescriptor(java.lang.String name, java.sql.Connection conn)
          Descriptor factory.
static ArrayDescriptor createDescriptor(java.lang.String name, java.sql.Connection conn, boolean recurse, boolean force)
          Descriptor factory.
 java.lang.String descType()
          Describe the collection type.
 OracleTypeMetaData.ArrayStorage getArrayStorage()
          Return the database type of the array.
 int getArrayType()
          Return the database type of the array.
 java.lang.String getBaseName()
          In case the elements are named types the fully qualified name of their type.Otherwise, return type name used by the database
 int getBaseType()
          Return element's type code.
 OracleTypeMetaData.Kind getKind()
          Return the kind of type.
 long getMaxLength()
          Return the maximun number of elements this array object can hold.
 int getTypeCode()
          Returns type code.
 java.sql.ResultSet toResultSet(ARRAY array, long index, int count, java.util.Map map, boolean saveLocalCopy)
           
 java.sql.ResultSet toResultSetFromImage(ARRAY array, long index, int count, java.util.Map map)
           
 
Methods inherited from class oracle.sql.TypeDescriptor
getInternalTypeCode, getName, getPrecision, getScale, getSubtypeName, getTypeCodeName, initMetadataRecursively, initNamesRecursively, isTransient, printXML, printXML, setConnection, setPrecision, setScale, toDatum, toJDBCObject, toXMLString, toXMLString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.jdbc.OracleTypeMetaData
getName, getSchemaName, getSQLName, getTypeCodeName
 

Field Detail

TYPE_VARRAY

public static final int TYPE_VARRAY
See Also:
Constant Field Values

TYPE_NESTED_TABLE

public static final int TYPE_NESTED_TABLE
See Also:
Constant Field Values

CACHE_NONE

public static final int CACHE_NONE
See Also:
Constant Field Values

CACHE_ALL

public static final int CACHE_ALL
See Also:
Constant Field Values

CACHE_LAST

public static final int CACHE_LAST
See Also:
Constant Field Values

BUILD_DATE

public static final java.lang.String BUILD_DATE
See Also:
Constant Field Values

TRACE

public static final boolean TRACE
See Also:
Constant Field Values
Method Detail

createDescriptor

public static ArrayDescriptor createDescriptor(java.lang.String name,
                                               java.sql.Connection conn)
                                        throws java.sql.SQLException
Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.

Parameters:
name - a String naming the type. (Not necessarily fully qualified)
connection - a Connection to a database
Throws:
java.sql.SQLException - if the name does not name an array type.

createDescriptor

public static ArrayDescriptor createDescriptor(java.lang.String name,
                                               java.sql.Connection conn,
                                               boolean recurse,
                                               boolean force)
                                        throws java.sql.SQLException
Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.

Parameters:
name - a String naming the type. (Not necessarily fully qualified)
connection - a Connection to a database
recurse - a boolean to specify whether to create descriptors for component objects
force - a boolean to specify whether to replace any cached descriptor.
Returns:
the descriptor created.
Throws:
java.sql.SQLException - if the name does not name an array type.

createDescriptor

public static ArrayDescriptor createDescriptor(oracle.sql.SQLName sqlName,
                                               java.sql.Connection conn)
                                        throws java.sql.SQLException
Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.

Parameters:
name - a SQLName with the name of the type.
connection - a Connection to a database
Returns:
the descriptor created.
Throws:
java.sql.SQLException - if the name does not name an array type.

createDescriptor

public static ArrayDescriptor createDescriptor(oracle.sql.SQLName sqlName,
                                               java.sql.Connection conn,
                                               boolean recurse,
                                               boolean force)
                                        throws java.sql.SQLException
Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.

Parameters:
name - a SQLName with the name of the type.
connection - a Connection to a database
recurse - a boolean to specify whether to create descriptors for component objects
force - a boolean to specify whether to replace any cached descriptor.
Returns:
the descriptor created.
Throws:
java.sql.SQLException - if the name does not name an array type.

getKind

public OracleTypeMetaData.Kind getKind()
Description copied from interface: OracleTypeMetaData
Return the kind of type.

Specified by:
getKind in interface OracleTypeMetaData
Overrides:
getKind in class TypeDescriptor
Returns:
the kind, ARRAY

getBaseType

public int getBaseType()
                throws java.sql.SQLException
Return element's type code.

Specified by:
getBaseType in interface OracleTypeMetaData.Array
Returns:
the type code of elements of the array
Throws:
java.sql.SQLException

getBaseName

public java.lang.String getBaseName()
                             throws java.sql.SQLException
In case the elements are named types the fully qualified name of their type.Otherwise, return type name used by the database

Specified by:
getBaseName in interface OracleTypeMetaData.Array
Returns:
the name of the base type.
Throws:
java.sql.SQLException - if the element's type is not named.

getArrayStorage

public OracleTypeMetaData.ArrayStorage getArrayStorage()
                                                throws java.sql.SQLException
Return the database type of the array. The possible return values are OracleTypeMetaData.ArrayStorage. Either as a nested table or VARRAY.

Specified by:
getArrayStorage in interface OracleTypeMetaData.Array
Returns:
how the array is stored in the database.
Throws:
java.sql.SQLException

getArrayType

public int getArrayType()
                 throws java.sql.SQLException
Return the database type of the array. The possible return values are ArrayDescriptor.TYPE_VARRAY and ArrayDescriptor.TYPE_NESTED_TABLE.

Returns:
database array type.
Throws:
java.sql.SQLException

getMaxLength

public long getMaxLength()
                  throws java.sql.SQLException
Return the maximun number of elements this array object can hold.

Specified by:
getMaxLength in interface OracleTypeMetaData.Array
Returns:
the maximum array size; return 0 if no limit.
Throws:
java.sql.SQLException

descType

public java.lang.String descType()
                          throws java.sql.SQLException
Describe the collection type.

Returns:
the type information
Throws:
java.sql.SQLException
Since:
8.1.7

toResultSet

public java.sql.ResultSet toResultSet(ARRAY array,
                                      long index,
                                      int count,
                                      java.util.Map map,
                                      boolean saveLocalCopy)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

toResultSetFromImage

public java.sql.ResultSet toResultSetFromImage(ARRAY array,
                                               long index,
                                               int count,
                                               java.util.Map map)
                                        throws java.sql.SQLException
Throws:
java.sql.SQLException

getTypeCode

public int getTypeCode()
                throws java.sql.SQLException
Description copied from class: TypeDescriptor
Returns type code.

Specified by:
getTypeCode in interface OracleTypeMetaData
Overrides:
getTypeCode in class TypeDescriptor
Throws:
java.sql.SQLException

Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

Copyright © 1998, 2007, Oracle. All rights reserved.