Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

18.4.5 CallableStatement interface

Organization of this subsection
(1) Overview
(2) Methods
(3) Package and class names
(4) Notes

(1) Overview

The CallableStatement interface provides the following main functions:

The CallableStatement class inherits all the functions of the PreparedStatement and Statement classes because the CallableStatement class is a subclass of the PreparedStatement class.

(2) Methods

The table below lists the methods of the CallableStatement interface. The interface does not support methods that are not listed in the table. If an unsupported method is specified, the interface throws an SQLException.

Table 18-25 CallableStatement interface methods

Subsection Method Function
(a) getBigDecimal(int parameterIndex) Acquires the value of a specified ? parameter as a java.math.BigDecimal object in Java programming language.
(b) getBigDecimal(int parameterIndex,int scale) Acquires the value of a specified ? parameter as a java.math.BigDecimal object in Java programming language, with as many decimal places as are specified in scale.
(c) getBlob(int parameterIndex) Acquires the value of a specified ? parameter as a java.sql.Blob object in Java programming language.
(d) getBlob(String parameterName) Acquires the value of a specified ? parameter as a java.sql.Blob object in Java programming language.
(e) getBoolean(int parameterIndex) Acquires the value of a specified ? parameter as boolean in Java programming language.
(f) getBoolean(String parameterName) Acquires the value of a specified ? parameter as boolean in Java programming language.
(g) getByte(int parameterIndex) Acquires the value of a specified ? parameter as byte in Java programming language.
(h) getByte(String parameterName) Acquires the value of a specified ? parameter as byte in Java programming language.
(i) getBytes(int parameterIndex) Acquires the value of a specified ? parameter as a byte array in Java programming language.
(j) getBytes(String parameterName) Acquires the value of a specified ? parameter as a byte array in Java programming language.
(k) getDate(int parameterIndex) Acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language.
(l) getDate(int parameterIndex, java.util.Calendar cal) Acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language.
(m) getDate(String parameterName) Acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language.
(n) getDate(String parameterName, java.util.Calendar cal) Acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language.
(o) getDouble(int parameterIndex) Acquires the value of a specified ? parameter as double in Java programming language.
(p) getDouble(String parameterName) Acquires the value of a specified ? parameter as double in Java programming language.
(q) getFloat(int parameterIndex) Acquires the value of a specified ? parameter as float in Java programming language.
(r) getFloat(String parameterName) Acquires the value of a specified ? parameter as float in Java programming language.
(s) getInt(int parameterIndex) Acquires the value of a specified ? parameter as int in Java programming language.
(t) getInt(String parameterName) Acquires the value of a specified ? parameter as int in Java programming language.
(u) getLong(int parameterIndex) Acquires the value of a specified ? parameter as long in Java programming language.
(v) getLong(String parameterName) Acquires the value of a specified ? parameter as long in Java programming language.
(w) getObject(int parameterIndex) Acquires the value of a specified ? parameter as java.lang.Object in Java programming language.
(x) getObject(String parameterName) Acquires the value of a specified ? parameter as java.lang.Object in Java programming language.
(y) getShort(int parameterIndex) Acquires the value of a specified ? parameter as short in Java programming language.
(z) getShort(String parameterName) Acquires the value of a specified ? parameter as short in Java programming language.
(aa) getString(int parameterIndex) Acquires the value of a specified ? parameter as a java.lang.String object in Java programming language.
(ab) getString(String parameterName) Acquires the value of a specified ? parameter as a java.lang.String object in Java programming language.
(ac) getTime(int parameterIndex) Acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language.
(ad) getTime(int parameterIndex, java.util.Calendar cal) Acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language.
(ae) getTime (String parameterName) Acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language.
(af) getTime(String parameterName, java.util.Calendar cal) Acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language.
(ag) getTimestamp(int parameterIndex) Acquires the value of a specified ? parameter as a java.sql.Timestamp object in Java programming language.
(ah) getTimestamp(int parameterIndex, java.util.Calendar cal) Acquires the value of a specified ? parameter as a java.sql.Timestamp object in Java programming language.
(ai) getTimestamp (String parameterName) Acquires the value of specified ? parameter as a java.sql.Timestamp object in Java programming language.
(aj) getTimestamp(String parameterName, java.util.Calendar cal) Acquires the value of a specified ? parameter as a java.sql.Timestamp object in Java programming language.
(ak) registerOutParameter(int parameterIndex,int sqlType) Registers the data type of a specified OUT parameter as a specified JDBC type.
(al) registerOutParameter(int parameterIndex,int sqlType,int scale) Registers the data type of a specified OUT parameter as a specified JDBC type.
(am) registerOutParameter(String parameterName,int sqlType) Registers the data type of a specified OUT parameter as a specified JDBC type.
(an) registerOutParameter(String parameterName,int sqlType,int scale) Registers the data type of a specified OUT parameter as a specified JDBC type.
(ao) setAsciiStream(String parameterName, java.io.InputStream x, int length) Sets the value of a java.io.InputStream object as a ? parameter value with a length no more than the length specified by length.
(ap) setBigDecimal(String parameterName, java.math.BigDecimal x) Sets a specified java.math.BigDecimal value as a ? parameter value.
(aq) setBinaryStream(String parameterName, java.io.InputStream x, int length) Acquires the value of a specified ? parameter as a java.math.BigDecimal object in Java programming language.
(ar) setBoolean(String parameterName,boolean x) Sets a specified boolean value as a ? parameter value.
(as) setByte(String parameterName,byte x) Sets a specified byte value as a ? parameter value.
(at) setBytes(String parameterName,byte[] x) Sets a specified byte array as a ? parameter value.
(au) setCharacterStream(String parameterName,Reader x,int length) Sets the value of a specified Reader object as a ? parameter value.
(av) setDate(String parameterName, java.sql.Date x) Sets the value of a java.sql.Date object as a ? parameter value.
(aw) setDate(String parameterName, java.sql.Date x,Calendar cal) Converts a java.sql.Date object specified in local time to the equivalent time value in a specified calendar's time zone, and then sets it as a ? parameter value.
(ax) setDouble(String parameterName,double x) Sets a specified double value as a ? parameter value.
(ay) setFloat(String parameterName,float x) Sets a specified float value as a ? parameter value.
(az) setInt(String parameterName,int x) Sets a specified int value as a ? parameter value.
(ba) setLong(String parameterName,long x) Sets a specified long value as a ? parameter value.
(bb) setNull(String parameterName,int sqlType) Sets the NULL value in a specified ? parameter.
(bc) setObject(String parameterName,Object x) Sets the value of a specified object as a ? parameter value.
(bd) setObject(String parameterName,Object x,int targetSqlType) Sets the value of a specified object as a ? parameter value.
(be) setObject(String parameterName,Object x,int targetSqlType,int scale) Sets the value of a specified object as a ? parameter value.
(bf) setShort(String parameterName,short x) Sets a specified short value as a ? parameter value.
(bg) setString(String parameterName,String x) Sets a specified String object as a ? parameter value.
(bh) setTime(String parameterName,Time x) Sets a specified java.sql.Time object as a ? parameter value.
(bi) setTime(String parameterName, java.sql.Time x,Calendar cal) Converts a java.sql.Time object specified in local time to the equivalent time value in a specified calendar's time zone, and then sets it as a ? parameter value.
(bj) setTimestamp(String parameterName, java.sql.Timestamp x) Sets a specified java.sql.Timestamp object as a ? parameter value.
(bk) setTimestamp(String parameterName, java.sql.Timestamp x,Calendar cal) Converts a java.sql.Timestamp object specified in local time to the equivalent time value in a specified calendar's time zone, and then sets it as a ? parameter value.
(bl) wasNull() Acquires a value indicating whether the value of the last OUT or INOUT parameter read was NULL.
(a) getBigDecimal(int parameterIndex)

Function
Acquires the value of a specified ? parameter as a java.math.BigDecimal object in Java programming language.

Format
 
public synchronized java.math.BigDecimal getBigDecimal(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
java.math.BigDecimal object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as a java.math.BigDecimal object in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter's value, and the return value:
HiRDB data type ? parameter's value Return value
[M|N][VAR]CHAR NULL null
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space] BigDecimal object containing the ? parameter value. The value without the single-byte spaces at the beginning and end of the character string is used as the BigDecimal object.
Other than the above SQLException is thrown
SMALLINT NULL null
Non-NULL BigDecimal object containing the ? parameter value
INTEGER NULL null
Non-NULL BigDecimal object containing the ? parameter value
REAL NULL null
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Other than the above BigDecimal object containing the ? parameter value
FLOAT NULL null
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Other than the above BigDecimal object containing the ? parameter value
DECIMAL NULL null
Non-NULL BigDecimal object containing the ? parameter value.
BOOLEAN NULL null
true BigDecimal object obtained based on BigDecimal(1)
false BigDecimal object obtained based on BigDecimal(0)
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(b) getBigDecimal(int parameterIndex, int scale)

Function
Acquires the value of a specified ? parameter as a java.math.BigDecimal object in Java programming language, with as many decimal places as are specified in scale.

Format
 
public synchronized java.math.BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.
int scale
Scaling. The permitted range is [Figure] scale [Figure] 2147483647.

Return value
java.math.BigDecimal object value with the number of decimal places specified in the scale argument of the specified ? parameter value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as a java.math.BigDecimal object in Java programming language, with as many decimal places as are specified in scale.
If the scale argument value is smaller than the number of decimal places in the ? parameter's value, the method discards the excess decimal places from the ? parameter's value. If the scale argument value is greater than the number of decimal places in the ? parameter's value, the method pads the ? parameter's value with 0s so that the number of decimal places match the scale value.
For details about the relationships among the HiRDB data type, the ? parameter's value, and the return value, see Functional detail in (a) getBigDecimal(int parameterIndex).

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • A value less than 0 was specified for scale.
  • The specified ? parameter's data type cannot be acquired by this method.
(c) getBlob(int parameterIndex)

Function
Acquires the value of a specified ? parameter as a java.sql.Blob object in Java programming language.

Format
 
public synchronized java.sql.Blob getBlob(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
java.sql.Blob object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as a java.sql.Blob object in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter's value, and the return value:
HiRDB data type ? parameter value Return value
BINARY
BLOB
NULL null
Non-NULL java.sql.Blob object containing the ? parameter's value
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(d) getBlob(String parameterName)

Function
Acquires the value of a specified ? parameter as a java.sql.Blob object in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter's value, and the return value, see Functional detail in (c) getBlob(int parameterIndex).

Format
 
public synchronized java.sql.Blob getBlob (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is assumed to be part of the ? parameter's name.

Return value
java.sql.Blob object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(e) getBoolean(int parameterIndex)

Function
Acquires the value of a specified ? parameter as boolean in Java programming language.

Format
 
public synchronized boolean getBoolean(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns false)

Functional detail
This method acquires the value of a specified ? parameter as boolean in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M][VAR]CHAR
NVARCHAR
NULL false
[single-byte-space]true (in single-byte characters; not case-sensitive)[single-byte-space] true
[single-byte-space]1 (single-byte character)[single-byte-space] true
Other than the above false
NCHAR NULL false
Value beginning with [single-byte-space]true (in single-byte characters; not case-sensitive) true
Other than the above false
SMALLINT NULL false
0 false
Non-zero value true
INTEGER NULL false
0 false
Non-zero value true
REAL NULL false
Infinity true
-Inifnity true
NaN true
0.0 or -0.0 false
Other than the above true
FLOAT NULL false
Infinity true
-Inifnity true
NaN true
0.0 or -0.0 false
Other than the above true
DECIMAL NULL false
0[.00...0] false
Other than the above true
BOOLEAN NULL false
Non-NULL ? parameter value
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(f) getBoolean(String parameterName)

Function
Acquires the value of a specified ? parameter as boolean in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (e) getBoolean(int parameterIndex).

Format
 
public synchronized boolean getBoolean (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns false)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(g) getByte(int parameterIndex)

Function
Acquires the value of a specified ? parameter as byte in Java programming language.

Format
 
public synchronized byte getByte(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Functional detail
This method acquires the value of a specified ? parameter as byte in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL 0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and Byte.MIN_VALUE or greater, and Byte.MAX_VALUE or less ? parameter value converted to a byte value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Byte.MAX_VALUE or less than Byte.MIN_VALUE SQLException is thrown
[single-byte-space][+]Infinity[single-byte-space] SQLException is thrown
[single-byte-space]-Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+|-]NaN[single-byte-space] SQLException is thrown
Other than the above (double value cannot be obtained) SQLException is thrown
SMALLINT NULL 0
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less ? parameter value converted to a byte value
Other than the above SQLException is thrown
INTEGER NULL 0
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less ? parameter value converted to a byte value
Other than the above SQLException is thrown
REAL NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less Integer part of the ? parameter converted to a byte value
Other than the above SQLException is thrown
FLOAT NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less Integer part of the ? parameter converted to a byte value
Other than the above SQLException is thrown
DECIMAL NULL 0
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less Integer part of the ? parameter converted to a byte value
Other than the above SQLException is thrown
BOOLEAN NULL 0
true 1
false 0
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(h) getByte(String parameterName)

Function
Acquires the value of a specified ? parameter as byte in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (g) getByte(int parameterIndex).

Format
 
public synchronized byte getByte (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(i) getBytes(int parameterIndex)

Function
Acquires the value of a specified ? parameter as a byte array in Java programming language.

Format
 
public synchronized byte[] getBytes(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
byte array containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as a byte array in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR
BINARY
BLOB
NULL null
Non-NULL ? parameter value converted to a byte array
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • A database access error occurred.
(j) getBytes(String parameterName)

Function
Acquires the value of a specified ? parameter as a byte array in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (i) getBytes(int parameterIndex).

Format
 
public synchronized byte[] getBytes(String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
byte array containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • A database access error occurred.
(k) getDate(int parameterIndex)

Function
Acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language.

Format
 
public synchronized java.sql.Date getDate(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
java.sql.Date object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL null
[single-byte-space]date-format[single-byte-space] Value obtained by removing single-byte spaces at the beginning and end of the ? parameter value and then converting to the java.sql.Date object
Other than the above SQLException is thrown
DATE NULL null
Non-NULL ? parameter value converted to a java.sql.Date object
TIMESTAMP NULL null
Non-NULL ? parameter value converted to a java.sql.Date object
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Date.
(l) getDate(int parameterIndex, java.util.Calendar cal)

Function
Acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language. This method creates the date value from the appropriate millisecond value obtained by using a specified calendar.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (k) getDate(int parameterIndex).

Format
 
public synchronized java.sql.Date getDate (int parameterIndex, java.util.Calendar cal) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.
java.util.Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
java.sql.Date object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Date.
(m) getDate(String parameterName)

Function
Acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (k) getDate(int parameterIndex).

Format
 
public synchronized java.sql.Date getDate (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
java.sql.Date object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Date.
(n) getDate(String parameterName, java.util.Calendar cal)

Function
Acquires the value of a specified ? parameter as a java.sql.Date object in Java programming language. This method creates the date value from the appropriate millisecond value obtained by using a specified calendar.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (k) getDate(int parameterIndex).

Format
 
public synchronized java.sql.Date getDate (String parameterName, java.util.Calendar cal) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.util.Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
java.sql.Date object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Date.
(o) getDouble(int parameterIndex)

Function
Acquires the value of a specified ? parameter as double in Java programming language.

Format
 
public synchronized double getDouble(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Functional detail
This method acquires the value of a specified ? parameter as double in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL 0.0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and -Double.MAX_VALUE or greater, and -Double.MAX_VALUE or greater, and Double.MIN_VALUE or less, and Double.MIN_VALUE or greater, and Double.MAX_VALUE or less ? parameter value converted to a double value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Double.MAX_VALUE Infinity
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and less than -Double.MAX_VALUE -Infinity
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and less than Double.MIN_VALUE, and greater than 0 0.0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than -Double.MIN_VALUE, and less than 0 -0.0
[single-byte-space]-Infinity[single-byte-space] -Infinity
[single-byte-space][+]Infinity[single-byte-space] Infinity
[single-byte-space][+|-]NaN[single-byte-space] NaN
Other than the above (double value cannot be obtained) SQLException is thrown
SMALLINT NULL 0.0
Non-NULL ? parameter value converted to a double value
INTEGER NULL 0
Non-NULL ? parameter value converted to a double value
REAL NULL 0.0
Infinity Infinity
-Infinity -Infinity
NaN NaN
Other than the above ? parameter value converted to a double value
FLOAT NULL 0.0
Infinity Infinity
-Infinity -Infinity
NaN NaN
Other than the above ? parameter value
DECIMAL NULL 0
Non-NULL ? parameter value converted to a double value
BOOLEAN NULL 0.0
true 1.0
false 0.0
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(p) getDouble(String parameterName)

Function
Acquires the value of a specified ? parameter as double in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (o) getDouble(int parameterIndex).

Format
 
public synchronized double getDouble (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(q) getFloat(int parameterIndex)

Function
Acquires the value of a specified ? parameter as float in Java programming language.

Format
 
public synchronized float getFloat(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Functional detail
This method acquires the value of a specified ? parameter as float in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL 0.0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and one of the following:
  • -Float.MAX_VALUE or greater and -Float.MIN_VALUE or less
  • Float.MIN_VALUE or greater and Float.MAX_VALUE or less
? parameter value converted to a float value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Float.MAX_VALUE Infinity
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and less than -Float.MAX_VALUE -Infinity
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and less than Float.MIN_VALUE, and greater than 0 0.0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than -Float.MIN_VALUE, and less than 0 -0.0
[single-byte-space]-Infinity[single-byte-space] -Infinity
[single-byte-space][+]Infinity[single-byte-space] Infinity
[single-byte-space][+|-]NaN[single-byte-space] NaN
Other than the above (cannot be converted to a float value) SQLException is thrown
SMALLINT NULL 0.0
Non-NULL ? parameter value converted to a float value
INTEGER NULL 0.0
Non-NULL ? parameter value converted to a float value
REAL NULL 0.0
Infinity Infinity
-Infinity -Infinity
NaN NaN
Other than the above ? parameter value
FLOAT NULL 0.0
Infinity Infinity
-Infinity -Infinity
NaN NaN
-Float.MAX_VALUE or greater and -Float.MIN_VALUE or less, or Float.MIN_VALUE or greater and Float.MAX_VALUE or less ? parameter value converted to a float value
Greater than Float.MAX_VALUE Infinity
Less than -Float.MAX_VALUE -Infinity
Less than Float.MIN_VALUE and greater than 0 0.0
Greater than -Float.MIN_VALUE and less than 0 -0.0
DECIMAL NULL 0.0
Non-NULL ? parameter value converted to a float value
BOOLEAN NULL 0.0
true 1.0
false 0.0
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(r) getFloat(String parameterName)

Function
Acquires the value of a specified ? parameter as float in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (q) getFloat(int parameterIndex).

Format
 
public synchronized float getFloat (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(s) getInt(int parameterIndex)

Function
Acquires the value of a specified ? parameter as int in Java programming language.

Format
 
public synchronized int getInt(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Functional detail
This method acquires the value of a specified ? parameter as int in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL 0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and Integer.MIN_VALUE or greater, and Integer.MAX_VALUE or less Integer part of the ? parameter converted to an int value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Integer.MAX_VALUE or less than Integer.MIN_VALUE SQLException is thrown
[single-byte-space]-Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+]Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+|-]NaN[single-byte-space] SQLException is thrown
Other than the above (double value cannot be obtained) SQLException is thrown
SMALLINT NULL 0
Non-NULL ? parameter value converted to an int value
INTEGER NULL 0
Non-NULL ? parameter value
REAL NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Integer.MIN_VALUE or greater and Integer.MAX_VALUE or less Integer part of the ? parameter converted to an int value
Other than the above SQLException is thrown
FLOAT NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Integer.MIN_VALUE or greater and Integer.MAX_VALUE or less Integer part of the ? parameter converted to an int value
Other than the above SQLException is thrown
DECIMAL NULL 0
Integer.MIN_VALUE or greater and Integer.MAX_VALUE or less Integer part of the ? parameter converted to an int value
Other than the above SQLException is thrown
BOOLEAN NULL 0
true 1
false 0
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(t) getInt(String parameterName)

Function
Acquires the value of a specified ? parameter as int in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (s) getInt(int parameterIndex).

Format
 
public synchronized int getInt (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(u) getLong(int parameterIndex)

Function
Acquires the value of a specified ? parameter as long in Java programming language.

Format
 
public synchronized long getlong(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Functional detail
This method acquires the value of a specified ? parameter as long in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL 0
[single-byte-space]integer-in-character-string-representation[single-byte-space] and 15 characters or less, or [single-byte-space]decimal-number-in-character-string-representation[single-byte-space] and 15 characters or less Integer part of the ? parameter converted to a long value
[single-byte-space]integer-in-character-string-representation[single-byte-space] and 16 characters or more, or [single-byte-space]decimal-number-in-character-string-representation[single-byte-space] and characters or more, or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and Long.MIN_VALUE or greater, and Long.MAX_VALUE or less Integer part of the ? parameter converted to a long value
[single-byte-space]integer-in-character-string-representation[single-byte-space] and 16 characters or more, or [single-byte-space]decimal-number-in-character-string-representation[single-byte-space] and 16 characters or more, or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], greater than Long.MAX_VALUE or less than Long.MIN_VALUE SQLException is thrown
[single-byte-space]-Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+]Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+|-]NaN[single-byte-space] SQLException is thrown
Other than the above (cannot be converted to a double value or BigDecimal object) SQLException is thrown
SMALLINT NULL 0
Non-NULL ? parameter value converted to a long value
INTEGER NULL 0
Non-NULL ? parameter value converted to a long value
REAL NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Long.MIN_VALUE or greater and Long.MAX_VALUE or less Integer part of the ? parameter converted to a long value
Other than the above SQLException is thrown
FLOAT NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Long.MIN_VALUE or greater and Long.MAX_VALUE or less Integer part of the ? parameter converted to a long value
Other than the above SQLException is thrown
DECIMAL NULL 0
Long.MIN_VALUE and greater and Long.MAX_VALUE and less Integer part of the ? parameter converted to a long value
Other than the above SQLException is thrown
BINARY
BLOB
NULL 0
Data with a length of 0 0
1 byte or more Maximum of 8 bytes converted to a long value in little endian format
BOOLEAN NULL 0
true 1
false 0
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(v) getLong(String parameterName)

Function
Acquires the value of a specified ? parameter as long in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (u) getLong(int parameterIndex).

Format
 
public synchronized long getLong (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(w) getObject(int parameterIndex)

Function
Acquires the value of a specified ? parameter as java.lang.Object in Java programming language.

Format
 
public synchronized Object getObject (int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
java.lang.Object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as java.lang.Object in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL null
Non-NULL ? parameter value
SMALLINT NULL null
Non-NULL Integer object created by the ? parameter value
INTEGER NULL null
Non-NULL Integer object created by the ? parameter value
REAL NULL null
Non-NULL Float object created by the ? parameter value
FLOAT NULL null
Non-NULL Double object created by the ? parameter value
DECIMAL NULL null
Non-NULL ? parameter value
DATE NULL null
Non-NULL java.sql.Date object created by the ? parameter value
TIME NULL null
Non-NULL java.sql.Time object created by the ? parameter value
TIMESTAMP NULL null
Non-NULL java.sql.Timestamp object created by the ? parameter value
BINARY
BLOB
NULL null
Non-NULL ? parameter value
BOOLEAN NULL null
Non-NULL Boolean object created by the ? parameter value

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • A database access error occurred.
(x) getObject(String parameterName)

Function
Acquires the value of a specified ? parameter as java.lang.Object in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (w) getObject(int parameterIndex).

Format
 
public synchronized Object getObject (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
java.lang.Object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(y) getShort(int parameterIndex)

Function
Acquires the value of a specified ? parameter as short in Java programming language.

Format
 
public synchronized short getShort(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Functional detail
This method acquires the value of a specified ? parameter as short in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL 0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and Short.MIN_VALUE or greater, and Short.MAX_VALUE or less Integer part of the ? parameter converted to a short value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Short.MAX_VALUE or less than Short.MIN_VALUE SQLException is thrown
[single-byte-space]-Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+]Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+|-]NaN[single-byte-space] SQLException is thrown
Other than the above (double value cannot be obtained) SQLException is thrown
SMALLINT NULL 0
Non-NULL ? parameter value
INTEGER NULL 0
Short.MIN_VALUE or greater and Short.MAX_VALUE or less ? parameter value converted to a short value
Other than the above SQLException is thrown
REAL NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Short.MIN_VALUE or greater and Short.MAX_VALUE or less Integer part of the ? parameter converted to a short value
Other than the above SQLException is thrown
FLOAT NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Short.MIN_VALUE or greater and Short.MAX_VALUE or less Integer part of the ? parameter converted to a short value
Other than the above SQLException is thrown
DECIMAL NULL 0
Short.MIN_VALUE and greater and Short.MAX_VALUE or less Integer part of the ? parameter converted to a short value
Other than the above SQLException is thrown
BOOLEAN NULL 0
true 1
false 0
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(z) getShort(String parameterName)

Function
Acquires the value of a specified ? parameter as short in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (y) getShort(int parameterIndex).

Format
 
public synchronized short getShort (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
Value of the specified ? parameter (if the value is NULL, the method returns 0)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(aa) getString(int parameterIndex)

Function
Acquires the value of a specified ? parameter as a java.lang.String object in Java programming language.

Format
 
public synchronized String getString(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
java.lang.String object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as a java.lang.String object in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL null
Non-NULL ? parameter value.
If the HiRDB_for_Java_DAB_CONVERT_NULL system property is set to TRUE and the ? parameter value is a character string with a length of 0, the return value is null.
SMALLINT NULL null
Non-NULL String object with the ? parameter value in character string representation
INTEGER NULL null
Non-NULL String object with the ? parameter value in character string representation
REAL NULL null
Infinity String object of the character string "Infinity"
-Infinity String object of the character string "-Infinity"
NaN String object of the character string "NaN"
Other than the above String object with the ? parameter value in character string representation
FLOAT NULL null
Infinity String object of the character string "Infinity"
-Infinity String object of the character string "-Infinity"
NaN String object of the character string "NaN"
Other than the above String object with the ? parameter value in character string representation
DECIMAL NULL null
Non-NULL String object with the ? parameter value in character string representation
DATE NULL null
Non-NULL String object of a character string in yyyy-MM-DD format acquired by JdbConvert.convertDate()
TIME NULL null
Non-NULL String object of a character string in hh:mm:ss format
TIMESTAMP NULL null
Non-NULL String object of a character string in yyyy-MM-DD[Figure]hh:mm:ss[.ffffff] format
BINARY
BLOB
NULL null
Non-NULL String object of the ? parameter value
BOOLEAN NULL null
true String object of the character string "true"
false String object of the character string "false"

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(ab) getString(String parameterName)

Function
Acquires the value of a specified ? parameter as a java.lang.String object in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (aa) getString(int parameterIndex).

Format
 
public synchronized String getString(String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
java.lang.String object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
(ac) getTime(int parameterIndex)

Function
Acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language.

Format
 
public synchronized java.sql.Time getTime(int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
java.sql.Time object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL null
[single-byte-space]time-format[single-byte-space] Value obtained by removing single-byte spaces at the beginning and end of the ? parameter value and then converting to a java.sql.Time object
Other than the above SQLException
TIME NULL null
Non-NULL ? parameter value converted to a java.sql.Time object
TIMESTAMP NULL null
Non-NULL ? parameter value converted to a java.sql.Time object
Other -- SQLException

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Time.
(ad) getTime(int parameterIndex, java.util.Calendar cal)

Function
Acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language. This method creates the time value from the appropriate millisecond value obtained by using a specified calendar.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (ac) getTime(int parameterIndex).

Format
 
public synchronized java.sql.Time getTime (int parameterIndex, java.util.Calendar cal) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.
java.util.Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
java.sql.Time object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Time.
(ae) getTime(String parameterName)

Function
Acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (ac) getTime(int parameterIndex).

Format
 
public synchronized java.sql.Time getTime (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
java.sql.Time object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Time.
(af) getTime(String parameterName, java.util.Calendar cal)

Function
Acquires the value of a specified ? parameter as a java.sql.Time object in Java programming language. This method creates the time value from the appropriate millisecond value obtained by using a specified calendar.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (ac) getTime(int parameterIndex).

Format
 
public synchronized java.sql.Time getTime (String parameterName, java.util.Calendar cal) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.util.Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
java.sql.Time object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Time.
(ag) getTimestamp(int parameterIndex)

Function
Acquires the value of a specified ? parameter as a java.sql.Timestamp object in Java programming language.

Format
 
public synchronized java.sql.Timestamp getTimestamp (int parameterIndex) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.

Return value
java.sql.Timestamp object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified ? parameter as a java.sql.Timestamp object in Java programming language.
The following table shows the relationships among the HiRDB data type, the ? parameter value, and the return value:
HiRDB data type ? parameter value Return value
[M|N][VAR]CHAR NULL null
[single-byte-space]timestamp-format[single-byte-space] Value obtained by removing single-byte spaces at the beginning and end of the ? parameter value and converting to a java.sql.Timestamp object
Other than the above SQLException is thrown
DATE NULL null
Non-NULL ? parameter value converted to a java.sql.Timestamp object
TIMESTAMP NULL null
Non-NULL ? parameter value converted to a java.sql.Timestamp object
Other -- SQLException is thrown

Legend:
--: Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Timestamp.
(ah) getTimestamp(int parameterIndex, java.util.Calendar cal)

Function
Acquires the value of a specified ? parameter as a java.sql.Timestamp object in Java programming language. This method creates the timestamp value from the appropriate millisecond value obtained by using a specified calendar.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (ag) getTimestamp(int parameterIndex).

Format
 
public synchronized java.sql.Timestamp getTimestamp (int parameterIndex, java.util.Calendar cal) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.
java.util.Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
java.sql.Timestamp object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Timestamp.
(ai) getTimestamp(String parameterName)

Function
Acquires the value of a specified ? parameter as a java.sql.Timestamp object in Java programming language.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (ag) getTimestamp(int parameterIndex).

Format
 
public synchronized java.sql.Timestamp getTimestamp (String parameterName) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.

Return value
java.sql.Timestamp object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Timestamp.
(aj) getTimestamp(String parameterName, java.util.Calendar cal)

Function
Acquires the value of a specified ? parameter as a java.sql.Timestamp object in Java programming language. This method creates the timestamp value from the appropriate millisecond value obtained from a specified calendar.
For details about the relationships among the HiRDB data type, the ? parameter value, and the return value, see Functional detail in (ag) getTimestamp(int parameterIndex).

Format
 
public synchronized java.sql.Timestamp getTimestamp (String parameterName, java.util.Calendar cal) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.util.Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
java.sql.Timestamp object containing the value of the specified ? parameter (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified ? parameter's data type cannot be acquired by this method.
  • The ? parameter value cannot be acquired as java.sql.Timestamp.
(ak) registerOutParameter(int parameterIndex, int sqlType)

Function
Registers the data type of a specified OUT parameter as a specified JDBC type.
If this method is used to set a DECIMAL-type OUT or INOUT parameter, 0 is assumed as the scale value.

Format
 
public synchronized void registerOutParameter(int parameterIndex, int sqlType) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.
int sqlType
JDBC type to be registered

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued for the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • The specified JDBC type cannot be mapped to an HiRDB data type.
(al) registerOutParameter(int parameterIndex, int sqlType, int scale)

Function
Registers the data type of a specified OUT parameter as a specified JDBC type.

Format
 
public synchronized void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException
 

Arguments
int parameterIndex
? parameter number, such as 1 for the first parameter, 2 for the second parameter, etc.
int sqlType
JDBC type to be registered
int scale
Scaling. The permitted value range is 0 [Figure] scale [Figure] 29.

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued for the Connection object that created this CallableStatement object.
  • A nonexistent ? parameter number was specified.
  • The specified ? parameter is the IN parameter.
  • Specified JDBC type cannot be mapped to an HiRDB data type.
  • The value specified for scale is less than 0 or greater than 29.
(am) registerOutParameter(String parameterName, int sqlType)

Function
Registers the data type of a specified OUT parameter as a specified JDBC type.
If this method is used to set a DECIMAL-type OUT or INOUT parameter, 0 is assumed as the scale value.

Format
 
public synchronized void registerOutParameter(String parameterName, int sqlType) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
int sqlType
JDBC type to be registered

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued for the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified JDBC type cannot be mapped to an HiRDB data type.
(an) registerOutParameter(String parameterName, int sqlType, int scale)

Function
Registers the data type of a specified OUT parameter as a specified JDBC type.

Format
 
public synchronized void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
int sqlType
JDBC type to be registered
int scale
Scaling. The permitted value range is 0 [Figure] scale [Figure] 29.

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued for the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the IN parameter.
  • The specified JDBC type cannot be mapped to an HiRDB data type.
  • The value specified for scale is less than 0 or greater than 29.
(ao) setAsciiStream(String parameterName, java.io.InputStream x, int length)

Function
Sets the value of a java.io.InputStream object as a ? parameter value with a length no more than the length specified by length.

Format
 
public synchronized void setAsciiStream(String parameterName, java.io.InputStream x, int length) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.io.InputStream x
InputStream object that contains the value to be set in the ? parameter
int length
Length of the stream to be set in bytes

Return value
None.

Functional detail
This method sets the value of a specified InputStream object in a ? parameter.
After entry from x is completed, this method does not execute the close() method on x.
If the ? parameter's HiRDB data type is not [M|N][VAR]CHAR, or BINARY, or BLOB, the JDBC driver throws an SQLException.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the OUT parameter.
  • A value less than 0 was specified for length.
  • The ? parameter's data type cannot be set by this method.
  • The specified value is outside the range of data types for the ? parameter or is in a format that cannot be converted.
  • Data loading from the stream failed.
(ap) setBigDecimal(String parameterName, java.math.BigDecimal x)

Function
Sets a specified java.math.BigDecimal value as a ? parameter value.

Format
 
public synchronized void setBigDecimal(String parameterName, java.math.BigDecimal x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.math.BigDecimal x
BigDecimal object that contains the value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the OUT parameter.
  • The specified data cannot be converted to the data type of the table definition because its integer part is longer than the integer part for the table definition.
  • The ? parameter's data type cannot be set by this method.
  • The specified value is outside the range of data types for the ? parameter or is in a format that cannot be converted.
(aq) setBinaryStream(String parameterName, java.io.InputStream x, int length)

Function
Acquires the value of a specified ? parameter as a java.math.BigDecimal object in Java programming language.

Format
 
public synchronized void setBinaryStream(String parameterName, java.io.InputStream x, int length) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.io.InputStream x
InputStream object that contains the value to be set in the ? parameter
int length
Length of the stream to be set in bytes

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the OUT parameter.
  • A value less than 0 was specified for length.
  • The ? parameter's data type cannot be set by this method.
  • The specified value is outside the range of data types for the ? parameter or is in a format that cannot be converted.
  • Data loading from the stream has failed.
(ar) setBoolean(String parameterName, boolean x)

Function
Sets a specified boolean value as a ? parameter value.
If the HiRDB data type of the specified ? parameter is CHAR, MCHAR, NCHAR, VARCHAR, MVARCHAR, or NVARHAR and x is true, then the ? parameter value is true. If the HiRDB data type of the specified ? parameter is CHAR, MCHAR, NCHAR, VARCHAR, MVARCHAR, or NVARHAR and x is false, then the ? parameter value is false[Figure] ([Figure]: single-byte space).

Format
 
public synchronized void setBoolean(String parameterName, boolean x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
boolean x
Value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified ? parameter is the OUT parameter.
(as) setByte(String parameterName, byte x)

Function
Sets a specified byte value as a ? parameter value.

Format
 
public synchronized void setByte(String parameterName, byte x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
byte x
Value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified ? parameter is the OUT parameter.
(at) setBytes(String parameterName,byte[] x)

Function
Sets a specified byte array as a ? parameter value.

Format
 
public synchronized void setBytes(String parameterName, byte[] x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
byte[] x
byte array that contains the values to be set in the ? parameter

Return value
None.

Functional detail
If the ? parameter's HiRDB data type is neither BINARY nor BLOB, this method results in an SQLException.
This method does not reference the settings in the byte array; instead, they are referenced when the executeXXX() method is executed. Therefore, if settings in the byte array are changed between when this method executes and when the executeXXX() method executes, the new settings become the ? parameter values.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • A specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(au) setCharacterStream(String parameterName, Reader x, int length)

Function
Sets the value of a specified Reader object as a ? parameter value.
If the ? parameter's HiRDB data type is not [M|N][VAR]CHAR, or BINARY, or BLOB, the JDBC driver throws an SQLException.

Format
 
public synchronized void setCharacterStream(String parameterName, Reader x, int length) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
Reader x
Reader object that contains the value to be set in the ? parameter
int length
Number of characters

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A value less than 0 was specified for length.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • Encoding failed.
  • The specified ? parameter is the OUT parameter.
(av) setDate(String parameterName, java.sql.Date x)

Function
Sets the value of a java.sql.Date object as a ? parameter value

Format
 
public synchronized void setDate(String parameterName, java.sql.Date x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.sql.Date x
java.sql.Date object that contains the value to be set in the ? parameter

Return value
None.

Functional detail
This method converts a java.sql.Date object specified in local time to the equivalent time value in a specified calendar's time zone, and then sets it as a ? parameter value.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(aw) setDate(String parameterName, java.sql.Date x,Calendar cal)

Function
Converts a java.sql.Date object specified in local time to the equivalent time value in a specified calendar's time zone, and then sets it as a ? parameter value.

Format
 
public synchronized void setDate(String parameterName, java.sql.Date x,Calendar cal) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.sql.Date x
java.sql.Date object that contains the value to be set in the ? parameter
Calendar cal
Calendar in which the time zone for the value to be stored in the database has been set. If null is specified, the JavaVM default calendar's time zone is assumed.

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(ax) setDouble(String parameterName, double x)

Function
Sets a specified double value as a ? parameter value.

Format
 
public synchronized void setDouble(String parameterName, double x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
double x
Value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(ay) setFloat(String parameterName, float x)

Function
Sets a specified float value as a ? parameter value.

Format
 
public synchronized void setFloat(String parameterName, float x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
float x
Value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(az) setInt(String parameterName, int x)

Function
Sets a specified int value as a ? parameter value.

Format
 
public synchronized void setInt(String parameterName, int x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
int x
Value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(ba) setLong(String parameterName, long x)

Function
Sets a specified long value as a ? parameter value.

Format
 
public synchronized void setLong(String parameterName, long x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
long x
Value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(bb) setNull(String parameterName,int sqlType)

Function
Sets the NULL value in a specified ? parameter.
This driver ignores the sqlType argument.

Format
 
public synchronized void setNull(String parameterName,int sqlType) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
int sqlType
JDBC's SQL data type

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified ? parameter is the OUT parameter.
(bc) setObject(String parameterName, Object x)

Function
Sets the value of a specified object as a ? parameter value.

Format
 
public synchronized void setObject(String parameterName, Object x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
Object x
Object that contains the value to be set in the ? parameter

Return value
None.

Functional detail
This method sets the value of a specified object as a ? parameter value.
If the type of the ? parameter specified by parameterName is HiRDB's CHAR, MCHAR, NCHAR, VARCHAR, MVARCHAR, or NVARHAR, x is a Boolean object, and x is true, then the ? parameter value is true. If the type of the ? parameter specified by parameterName is HiRDB's CHAR, MCHAR, NCHAR, VARCHAR, MVARCHAR, or NVARHAR, x is a Boolean object, and x is false, then the ? parameter value is false[Figure] ([Figure]: single-byte space).
If x is a byte array, this method does not reference settings in the byte array; instead, the byte array settings are referenced when an executeXXX() method is executed. Therefore, if settings in the byte array are changed between when this method executes and when the executeXXX() method executes, the new settings become the ? parameter values.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(bd) setObject(String parameterName, Object x, int targetSqlType)

Function
Sets the value of a specified object as a ? parameter value.

Format
 
public synchronized void setObject(String parameterName, Object x, int targetSqlType) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
Object x
Object that contains the value to be set in the ? parameter
int targetSqlType
JDBC's SQL data type

Return value
None.

Functional detail
This method sets the value of a specified object as a ? parameter value.
If targetSqlType is java.sql.Types.CHAR, java.sql.Types.VARCHAR, or java.sql.Types.LONGVARCHAR, x is a Boolean object, and x is true, then the ? parameter value is 1,0.
If the ? parameter's data type is NCHAR or NVARCHAR type (which are HiRDB data types) and its value is 1,0, the JDBC driver throws an SQLException.
If x is a byte array, this method does not reference settings in the byte array; instead, the byte array's settings are referenced when an executeXXX() method is executed. Therefore, if settings in the byte array are changed between when this method executes and when the executeXXX() method executes, the new settings become the ? parameter's values.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • targetSqlType is one of the following:
    Types.ARRAY, Types.CLOB, Types.REF, or Types.STRUCT
  • The specified ? parameter is the OUT parameter.
(be) setObject(String parameterName, Object x, int targetSqlType, int scale)

Function
Sets the value of a specified object as a ? parameter value.

Format
 
public synchronized void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
Object x
Object that contains the value to be set in the ? parameter
int targetSqlType
JDBC's SQL data type
int scale
Scaling (ignored, if specified)

Return value
None.

Functional detail
This method sets the value of a specified object as a ? parameter value.
If targetSqlType is java.sql.Types.CHAR, java.sql.Types.VARCHAR, or java.sql.Types.LONGVARCHAR, x is a Boolean object, and x is true, then the ? parameter value is 1,0.
If the ? parameter's data type is NCHAR or NVARCHAR (which are HiRDB data types) and its value is 1,0, the JDBC driver throws an SQLException.
If x is a byte array, this method does not reference settings in the byte array; instead the byte array's settings are referenced when an executeXXX() method is executed. Therefore, if settings in the byte array are changed between when this method executes and when the executeXXX() method executes, the new settings become the ? parameter's values.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • targetSqlType is one of the following:
    Types.ARRAY, Types.CLOB, Types.REF, or Types.STRUCT
  • The specified ? parameter is the OUT parameter.
(bf) setShort(String parameterName, short x)

Function
Sets a specified short value as a ? parameter value.

Format
 
public synchronized void setShort(String parameterName, short x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
short x
Value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified ? parameter is the OUT parameter.
(bg) setString(String parameterName, String x)

Function
Sets a specified String object as a ? parameter value.

Format
 
public synchronized void setString(String parameterName, String x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
String x
String object that contains the value to be set in the ? parameter

Return value
None.

Functional detail
This method sets in the ? parameter the String object specified in the x argument.
The following table shows the value of the ? parameter when the x argument's value is a character string with a length of 0:
Data type of ? parameter Value of ? parameter
[M|N][VAR]CHAR
  • When the HiRDB_for_Java_DAB_CONVERT_NULL system property is set to TRUE
    null
  • Otherwise
    Character string with a length of 0
BINARY or BLOB Character string with a length of 0
Other null

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • Encoding failed.
  • The specified ? parameter is the OUT parameter.
(bh) setTime(String parameterName, Time x)

Function
Sets a specified java.sql.Time object as a ? parameter value.

Format
 
public synchronized void setTime(String parameterName, Time x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.sql.Time x
java.sql.Time object that contains the value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified ? parameter is the OUT parameter.
(bi) setTime(String parameterName, java.sql.Time x,Calendar cal)

Function
Converts a java.sql.Time object specified in local time to the equivalent time value in a specified calendar's time zone, and then sets it as a ? parameter value.

Format
 
public synchronized void setTime(String parameterName, java.sql.Time x,Calendar cal) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.sql.Time x
java.sql.Time object that contains the value to be set in the ? parameter
Calendar cal
Calendar in which the time zone for the value to be stored in the database has been set. If null is specified, the JavaVM default calendar's time zone is assumed.

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified ? parameter is the OUT parameter.
(bj) setTimestamp(String parameterName, java.sql.Timestamp x)

Function
Sets a specified java.sql.Timestamp object as a ? parameter value.

Format
 
public synchronized void setTimestamp(String parameterName, java.sql.Timestamp x) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.sql.Timestamp x
java.sql.Timestamp object that contains the value to be set in the ? parameter

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(bk) setTimestamp(String parameterName, java.sql.Timestamp x,Calendar cal)

Function
Converts a java.sql.Timestamp object specified in local time to the equivalent time value in a specified calendar's time zone, and then sets it as a ? parameter value.

Format
 
public synchronized void setTimestamp(String parameterName, java.sql.Timestamp x,Calendar cal) throws SQLException
 

Arguments
String parameterName
Parameter name (which is not case sensitive). Because the entire character string in parameterName is assumed to be the ? parameter's name, any double-quotation mark (") contained in the character string is treated as part of the ? parameter's name.
java.sql.Timestamp x
java.sql.Timestamp object that contains the value to be set in the ? parameter
Calendar cal
Calendar in which the time zone for the value to be stored in the database has been set. If null is specified, the JavaVM default calendar's time zone is assumed.

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued to the Connection object that created this CallableStatement object.
  • A nonexistent parameter name was specified (including the case where the specified parameterName value is null or a character string with a length of 0).
  • This method does not support the HiRDB data type specified in the ? parameter.
  • The specified value is outside the range of data types for the column or in a format that cannot be converted.
  • The specified ? parameter is the OUT parameter.
(bl) wasNull()

Function
Acquires a value indicating whether the value of the last OUT or INOUT parameter read was NULL.

Format
 
public synchronized boolean wasNull() throws SQLException
 

Arguments
None.

Return value
If the value of the last parameter read was NULL, the method returns true; if not, the method returns false.
The following table shows the return values.

Table 18-26 Return values

Condition Return value
Last parameter read was NULL. true
Last parameter read was not NULL. false
Before an execute-related method has executed (ResultSet for OUT parameter is null). false
No get operation (getXXX) has been performed. false
After clearParameters has executed. Same value as before clearParameters executed
After an execute-related method has re-executed (spanning a close of ResultSet for an OUT parameter). false

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • close() has already been issued for the CallableStatement object.
  • close() has already been issued for the Connection object that created this CallableStatement object.

(3) Package and class names

The following are the package and class names for installing this interface:

Package name: JP.co.Hitachi.soft.HiRDB.JDBC

Class name: PrdbCallableStatement

(4) Notes

(a) Attributes of OUT parameter in stored procedures
(b) Notes about using the DECIMAL type

If you use a registerOutParameter(int parameterIndex, int sqlType) method that does not accept decimal places to set a DECIMAL-type OUT or INOUT parameter, the number of digits will be assumed to be 0.

(c) Specifying a value for a DECIMAL-type ? parameter

The following should be noted when a setXXX method is used to set a value in a ? parameter of HiRDB's DECIMAL type and the precision and scaling acquired by the CALL statement's preprocessing do not match the precision and scaling of the value:

When the value's precision is higher than the precision acquired by the CALL statement's preprocessing: An SQLException is thrown.

When the value's precision is lower than the precision acquired by the CALL statement's preprocessing: The value is expanded.

When the value's scaling is greater than the scaling acquired by the CALL statement's preprocessing: The value is truncated based on the scaling acquired by the CALL statement's preprocessing.

When the value's scaling is less than the scaling acquired by the CALL statement's preprocessing: The value is padded with 0s.