Hitachi

Hitachi Advanced Database Application Development Guide


8.6.51 getString(int columnIndex)

Organization of this subsection

(1) Function

This method acquires as String in the Java programming language the value in a specified column in the current row of the ResultSet object. The column whose value is to be acquired is specified in the argument.

(2) Format

public synchronized String getString(int columnIndex) throws SQLException

(3) Arguments

int columnIndex

Specifies a column number.

(4) Return value

This method returns the column value. The following table shows the relationship between the retrieval result and the return value.

Table 8‒40: Relationship between the retrieval result and the return value (getString method)

HADB data type

Retrieval result

Return value

CHAR

VARCHAR

STRING

Null value

null

Other than the above

retrieval-result

SMALLINT

Null value

null

Other than the above

String object containing the retrieval result in character string representation

INTEGER

BIGINT

Null value

null

Other than the above

String object containing the retrieval result in character string representation

DECIMAL

NUMERIC

Null value

null

Other than the above

String object containing the retrieval result in character string representation

DOUBLE PRECISION

FLOAT

REAL

Null value

null

Other than the above

String object containing the retrieval result in character string representation

DATE

Null value

null

Other than the above

String object of a character string in YYYY-MM-DD format

TIME

Null value

null

Other than the above

String object of a character string in hh:mm:ss[.f...] format

TIMESTAMP WITHOUT TIME ZONE

Null value

null

Other than the above

String object of a character string in YYYY-MM-DDΔhh:mm:ss[.f...] format (Δ indicates a space)

TIMESTAMP WITH TIME ZONE

Null value

null

Other than the above

String object of a character string in YYYY-MM-DDΔhh:mm:ss[.f...]+00:00 format (Δ indicates a space)

BINARY

VARBINARY

Null value

null

Other than the above

retrieval-result

UUID

Null value

null

Other than the above

String object of a character string in AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE format

BOOLEAN

Null value

null

true

String object of the character string "true"

false

String object of the character string "false"

(5) Exceptions

The JDBC driver throws an SQLException in the following cases: