Array
object, which is the mapping in the Java programming language of an SQL
ARRAY value.
The SerialArray class provides a constructor for creating
a SerialArray instance from an Array object,
methods for getting the base type and the SQL name for the base type, and
methods for copying all or part of a SerialArray object.
Note
In order for this class to function correctly, a connection to the
data source
must be available in order for the SQL Array object to be
materialized (have all of its elements brought to the client server)
if necessary. At this time, logical pointers to the data in the data source,
such as locators, are not currently supported.
| Modifier and Type | Field and Description |
|---|---|
| private int | baseType
The SQL type of the elements in this |
| private String | baseTypeName
The type name used by the DBMS for the elements in the SQL |
| private Object[] | elements
A serialized array in which each element is an |
| private int | len
The number of elements in this |
| pack-priv static final long | serialVersionUID
The identifier that assists in the serialization of this |
| Access | Constructor and Description |
|---|---|
| public | SerialArray(Array
the array, Map<String, Class<?>> Array object to be serializeda map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT (an SQL structured type or
distinct type) and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mapped. The map
parameter does not have any effect for Blob,
Clob, DATALINK, or
JAVA_OBJECT types.Constructs a new |
| public | SerialArray(Array
the array)Array object to be serializedConstructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: a clone of this SerialArrayOverrides java. Returns a clone of this |
| public boolean | Returns: true if the given object represents a SerialArray
equivalent to this SerialArray, false otherwiseThe object to compare this obj)SerialArray againstOverrides java. Compares this SerialArray to the specified object. |
| public void | free()
Implements java. This method frees the |
| public Object | Returns: a copy of thisSerialArray object as an
Object in the Java programming languageImplements java. Returns a new array that is a copy of this |
| public Object | Returns: a copy of thisSerialArray object as an
Object in the Java programming languagea map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedImplements java. Returns a new array that is a copy of this |
| public Object | Returns: a copy of the designated elements in thisSerialArray
object as an Object in the Java programming languagethe index into this index, int SerialArray object
of the first element to be copied;
the index of the first element is 0the number of consecutive elements to be copied, starting
at the given index count)Implements java. Returns a new array that is a copy of a slice
of this |
| public Object | Returns: a copy of the designated elements in thisSerialArray
object as an Object in the Java programming languagethe index into this index, int SerialArray object
of the first element to be copied; the index of the
first element in the array is 0the number of consecutive elements to be copied, starting
at the given index count, Map<String, Class<?>> a map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedImplements java. Returns a new array that is a copy of a slice
of this |
| public int | Returns: one of the constants injava.sql.Types, indicating
the SQL type of the elements in this SerialArray objectImplements java. Retrieves the SQL type of the elements in this |
| public String | Returns: the SQL type name used by the DBMS for the base type of thisSerialArray objectImplements java. Retrieves the DBMS-specific type name for the elements in this
|
| public ResultSet | Returns: aResultSet object containing the designated
elements in this SerialArray object, with a
separate row for each elementthe index into this index, int SerialArray object
of the first element to be copied; the index of the
first element in the array is 0the number of consecutive elements to be copied, starting
at the given index count)Implements java. Retrieves a |
| public ResultSet | Returns: aResultSet object containing all of the
elements in this SerialArray object, with a
separate row for each elementa map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedImplements java. Retrieves a |
| public ResultSet | Returns: aResultSet object containing all of the
elements in this SerialArray object, with a
separate row for each elementImplements java. Retrieves a |
| public ResultSet | Returns: aResultSet object containing the designated
elements in this SerialArray object, with a
separate row for each elementthe index into this index, int SerialArray object
of the first element to be copied; the index of the
first element in the array is 0the number of consecutive elements to be copied, starting
at the given index count, Map<String, Class<?>> a map)java.util.Map object in which
each entry consists of 1) a String object
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedImplements java. Retrieves a result set holding the elements of the subarray that starts at
Retrieves a |
| public int | Returns: a hash code value for this object.Overrides java. Returns a hash code for this SerialArray. |
| private void | |
| private void | readObject(ObjectInputStream
the s)ObjectInputStream to read from.readObject is called to restore the state of the |
| private void | writeObject(ObjectOutputStream
the s)ObjectOutputStream to write to.writeObject is called to save the state of the |
| baseType | back to summary |
|---|---|
| private int baseType The SQL type of the elements in this | |
| baseTypeName | back to summary |
|---|---|
| private String baseTypeName The type name used by the DBMS for the elements in the SQL | |
| elements | back to summary |
|---|---|
| private Object[] elements A serialized array in which each element is an
| |
| len | back to summary |
|---|---|
| private int len The number of elements in this | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID The identifier that assists in the serialization of this | |
| SerialArray | back to summary |
|---|---|
| public SerialArray(Array array, Map<String, Class<?>> map) throws SerialException, SQLException Constructs a new This method does custom mapping if the array elements are a UDT and the given type map has an entry for that UDT. Custom mapping is recursive, meaning that if, for instance, an element of an SQL structured type is an SQL structured type that itself has an element that is an SQL structured type, each structured type that has a custom mapping will be mapped according to the given type map.
The new Note (1) The Note (2) If the Note (3) The
| |
| SerialArray | back to summary |
|---|---|
| public SerialArray(Array array) throws SerialException, SQLException Constructs a new
This constructor does not do custom mapping. If the base type of the array
is an SQL structured type and custom mapping is desired, the constructor
The new Note (1) The Note (2) The
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Returns a clone of this
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Compares this SerialArray to the specified object. The result is
| |
| free | back to summary |
|---|---|
| public void free() throws SQLException Implements java. This method frees the If
| |
| getArray | back to summary |
|---|---|
| public Object getArray() throws SerialException Implements java. Returns a new array that is a copy of this
| |
| getArray | back to summary |
|---|---|
| public Object getArray(Map<String, Class<?>> map) throws SerialException Implements java. Returns a new array that is a copy of this This method does custom mapping if the array elements are a UDT and the given type map has an entry for that UDT. Custom mapping is recursive, meaning that if, for instance, an element of an SQL structured type is an SQL structured type that itself has an element that is an SQL structured type, each structured type that has a custom mapping will be mapped according to the given type map.
| |
| getArray | back to summary |
|---|---|
| public Object getArray(long index, int count) throws SerialException Implements java. Returns a new array that is a copy of a slice
of this
| |
| getArray | back to summary |
|---|---|
| public Object getArray(long index, int count, Map<String, Class<?>> map) throws SerialException Implements java. Returns a new array that is a copy of a slice
of this This method does custom mapping if the array elements are a UDT and the given type map has an entry for that UDT. Custom mapping is recursive, meaning that if, for instance, an element of an SQL structured type is an SQL structured type that itself has an element that is an SQL structured type, each structured type that has a custom mapping will be mapped according to the given type map.
| |
| getBaseType | back to summary |
|---|---|
| public int getBaseType() throws SerialException Implements java. Retrieves the SQL type of the elements in this
| |
| getBaseTypeName | back to summary |
|---|---|
| public String getBaseTypeName() throws SerialException Implements java. Retrieves the DBMS-specific type name for the elements in this
| |
| getResultSet | back to summary |
|---|---|
| public ResultSet getResultSet(long index, int count) throws SerialException Implements java. Retrieves a
| |
| getResultSet | back to summary |
|---|---|
| public ResultSet getResultSet(Map<String, Class<?>> map) throws SerialException Implements java. Retrieves a
| |
| getResultSet | back to summary |
|---|---|
| public ResultSet getResultSet() throws SerialException Implements java. Retrieves a
| |
| getResultSet | back to summary |
|---|---|
| public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map) throws SerialException Implements java. Retrieves a result set holding the elements of the subarray that starts at
Retrieves a
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code for this SerialArray. The hash code for a
| |
| isValid | back to summary |
|---|---|
| private void isValid() throws SerialException Check to see if this object had previously had its | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException readObject is called to restore the state of the
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream s) throws IOException writeObject is called to save the state of the
| |