Hitachi

Hitachi Advanced Database Application Development Guide


8.1.2 getArray()

Organization of this subsection

(1) Function

This method acquires all array elements of an array-type column as an Object array.

(2) Format

public synchronized Object getArray() throws SQLException

(3) Arguments

None.

(4) Return value

This method returns an Object array containing all array elements of the array type held within this Array object.

The following table lists the HADB data types of the returned array elements.

Table 8‒2: HADB data types of returned array elements

HADB data type of array element (element data type)

Returned array

BIGINT

java.lang.Long[]

INTEGER#1

java.lang.Integer[]

SMALLINT#2

java.lang.Short[]

DECIMAL or NUMERIC

java.math.BigDecimal[]

DOUBLE PRECISION or FLOAT

java.lang.Double[]

REAL

java.lang.Float[]

CHAR

java.lang.String[]

VARCHAR

java.lang.String[]

STRING

java.lang.String[]

DATE

java.sql.Date[]

TIME

java.sql.Time[]

TIMESTAMP WITHOUT TIME ZONE

java.sql.Timestamp[]

TIMESTAMP WITH TIME ZONE

java.time.OffsetDateTime[]

BINARY

java.io.InputStream[]

VARBINARY

java.io.InputStream[]

BOOLEAN

java.lang.Boolean[]

UUID

java.io.InputStream[]

#1

If the integer data type format is in legacy format, java.lang.Long[] is returned.

#2

If the integer data type format is in legacy format, java.lang.Integer[] is returned.

(5) Exceptions

The JDBC driver throws an SQLException in the following cases: