Package oracle.sql

Class ArrayDescriptor

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, oracle.jdbc.diagnostics.Diagnosable, oracle.jdbc.internal.ACProxyable, oracle.jdbc.internal.ObjectData, oracle.jdbc.internal.OracleTypeMetaData, oracle.jdbc.internal.OracleTypeMetaData.Array, OracleData, OracleTypeMetaData, OracleTypeMetaData.Array, ORAData

    public class ArrayDescriptor
    extends TypeDescriptor
    implements oracle.jdbc.internal.OracleTypeMetaData.Array, java.io.Serializable
    Deprecated.
    Use factory method OracleConnection.createOracleArray to create an instance of java.sql.Array directly.
    Describes an array class. In Oracle 8 all arrays are named types.
    See Also:
    Connection.createArrayOf(java.lang.String, java.lang.Object[]), Serialized Form
    • Method Detail

      • createDescriptor

        public static ArrayDescriptor createDescriptor​(java.lang.String name,
                                                       java.sql.Connection conn)
                                                throws java.sql.SQLException
        Deprecated.
        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
        Returns:
        An array descriptor for the specified name
        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
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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.
      • getBaseType

        public int getBaseType()
                        throws java.sql.SQLException
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        Describe the collection type.
        Returns:
        the type information
        Throws:
        java.sql.SQLException
        Since:
        8.1.7
      • toBytes

        public byte[] toBytes​(oracle.jdbc.internal.OracleArray s,
                              Datum sDatum,
                              boolean keepLocalCopy)
                       throws java.sql.SQLException
        Deprecated.
        Side Effect: array.datumArray, array.bytes may be modified if 'keepLocalCopy' is true
        Throws:
        java.sql.SQLException
      • toOracleArray

        public Datum[] toOracleArray​(oracle.jdbc.internal.OracleArray s,
                                     Datum sDatum,
                                     long beginIdx,
                                     int count,
                                     boolean keepLocalCopy)
                              throws java.sql.SQLException
        Deprecated.
        Side Effect: array.datumArray, array.bytes may be modified if 'keepLocalCopy' is true
        Throws:
        java.sql.SQLException
      • toJavaArray

        public java.lang.Object[] toJavaArray​(oracle.jdbc.internal.OracleArray s,
                                              Datum sDatum,
                                              long beginIdx,
                                              int count,
                                              java.util.Map map,
                                              boolean keepLocalCopy)
                                       throws java.sql.SQLException
        Deprecated.
        Side Effect: array.datumArray, array.bytes, s.objectArray may be modified if 'keepLocalCopy' is true
        Throws:
        java.sql.SQLException
      • toResultSet

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

        public java.sql.ResultSet toResultSet​(oracle.jdbc.internal.OracleArray array,
                                              Datum arrayDatum,
                                              long index,
                                              int count,
                                              java.util.Map map,
                                              boolean saveLocalCopy)
                                       throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • toResultSetFromImage

        public java.sql.ResultSet toResultSetFromImage​(oracle.jdbc.internal.OracleArray array,
                                                       long index,
                                                       int count,
                                                       java.util.Map map)
                                                throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • toNumericArray

        public java.lang.Object toNumericArray​(oracle.jdbc.internal.OracleArray array,
                                               Datum arrayDatum,
                                               long beginIdx,
                                               int count,
                                               int type,
                                               boolean saveLocalCopy)
                                        throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException