public class AS400JDBCCallableStatement extends AS400JDBCPreparedStatementImpl implements java.sql.CallableStatement
The AS400JDBCCallableStatement class runs a stored procedure. Use Connection.prepareCall() to create new CallableStatement objects.
Parameters are indexed sequentially, by number, starting at 1. The caller must register output parameters before executing the stored procedure.
The new JDK 1.4 methods add the ability to retrieve information by column name in addition to column index. Be aware you will see better performance accessing columns by their index rather than accessing them by their name.
extendedColumnDescriptors_| Modifier and Type | Method and Description |
|---|---|
java.sql.Array |
getArray(int parameterIndex)
Returns the value of an SQL ARRAY output parameter as an Array value.
|
java.sql.Array |
getArray(java.lang.String parameterName)
Returns the value of an SQL ARRAY output parameter as an Array value.
|
java.math.BigDecimal |
getBigDecimal(int parameterIndex)
Returns the value of an SQL NUMERIC or DECIMAL output parameter as a
BigDecimal object.
|
java.math.BigDecimal |
getBigDecimal(int parameterIndex,
int scale)
Deprecated.
Use getBigDecimal(int) or getBigDecimal(String) instead.
|
java.math.BigDecimal |
getBigDecimal(java.lang.String parameterName)
Returns the value of an SQL NUMERIC or DECIMAL output parameter as a
BigDecimal object.
|
java.sql.Blob |
getBlob(int parameterIndex)
Returns the value of an SQL BLOB output parameter as a Blob value.
|
java.sql.Blob |
getBlob(java.lang.String parameterName)
Returns the value of an SQL BLOB output parameter as a Blob value.
|
boolean |
getBoolean(int parameterIndex)
Returns the value of an SQL SMALLINT output parameter as a
Java boolean.
|
boolean |
getBoolean(java.lang.String parameterName)
Returns the value of an SQL SMALLINT output parameter as a
Java boolean.
|
byte |
getByte(int parameterIndex)
Returns the value of an SQL SMALLINT output parameter as a
Java byte.
|
byte |
getByte(java.lang.String parameterName)
Returns the value of an SQL SMALLINT output parameter as a
Java byte.
|
byte[] |
getBytes(int parameterIndex)
Returns the value of an SQL BINARY or VARBINARY output parameter as a
Java byte array.
|
byte[] |
getBytes(java.lang.String parameterName)
Returns the value of an SQL BINARY or VARBINARY output parameter as a
Java byte array.
|
java.io.Reader |
getCharacterStream(int parameterIndex)
Retrieves the value of the designated parameter as a
java.io.Reader object in the Java programming language. |
java.io.Reader |
getCharacterStream(java.lang.String parameterName)
Retrieves the value of the designated parameter as a
java.io.Reader object in the Java programming language. |
java.sql.Clob |
getClob(int parameterIndex)
Returns the value of an SQL CLOB output parameter as a Clob value.
|
java.sql.Clob |
getClob(java.lang.String parameterName)
Returns the value of an SQL CLOB output parameter as a Clob value.
|
java.sql.Date |
getDate(int parameterIndex)
Returns the value of an SQL DATE output parameter as a
java.sql.Date object using the default calendar.
|
java.sql.Date |
getDate(int parameterIndex,
java.util.Calendar calendar)
Returns the value of an SQL DATE output parameter as a
java.sql.Date object using a calendar other than the default.
|
java.sql.Date |
getDate(java.lang.String parameterName)
Returns the value of an SQL DATE output parameter as a
java.sql.Date object using the default calendar.
|
java.sql.Date |
getDate(java.lang.String parameterName,
java.util.Calendar calendar)
Returns the value of an SQL DATE output parameter as a
java.sql.Date object using a calendar other than the default.
|
double |
getDouble(int parameterIndex)
Returns the value of an SQL DOUBLE or FLOAT output parameter as a
Java double.
|
double |
getDouble(java.lang.String parameterName)
Returns the value of an SQL DOUBLE or FLOAT output parameter as a
Java double.
|
float |
getFloat(int parameterIndex)
Returns the value of an SQL REAL or FLOAT output parameter as a
Java float.
|
float |
getFloat(java.lang.String parameterName)
Returns the value of an SQL REAL or FLOAT output parameter as a
Java float.
|
int |
getInt(int parameterIndex)
Returns the value of an SQL INTEGER output parameter as a
Java int.
|
int |
getInt(java.lang.String parameterName)
Returns the value of an SQL INTEGER output parameter as a
Java int.
|
long |
getLong(int parameterIndex)
If the connected system supports SQL BIGINT data, this returns
the value of an SQL BIGINT output parameter as a Java long.
|
long |
getLong(java.lang.String parameterName)
If the connected system supports SQL BIGINT data, this returns
the value of an SQL BIGINT output parameter as a Java long.
|
java.io.Reader |
getNCharacterStream(int parameterIndex)
Retrieves the value of the designated parameter as a
java.io.Reader object in the Java programming language. |
java.io.Reader |
getNCharacterStream(java.lang.String parameterName)
Retrieves the value of the designated parameter as a
java.io.Reader object in the Java programming language. |
java.lang.String |
getNString(int parameterIndex)
Retrieves the value of the designated
NCHAR,
NVARCHAR
or LONGNVARCHAR parameter as
a String in the Java programming language. |
java.lang.String |
getNString(java.lang.String parameterName)
Retrieves the value of the designated
NCHAR,
NVARCHAR
or LONGNVARCHAR parameter as
a String in the Java programming language. |
java.lang.Object |
getObject(int parameterIndex)
Returns the value of an output parameter as a Java Object.
|
java.lang.Object |
getObject(int parameterIndex,
java.lang.Class type) |
java.lang.Object |
getObject(int parameterIndex,
java.util.Map typeMap)
Returns the value of an output parameter as a Java Object.
|
java.lang.Object |
getObject(java.lang.String parameterName)
Returns the value of an output parameter as a Java Object.
|
java.lang.Object |
getObject(java.lang.String parameterName,
java.lang.Class type) |
java.lang.Object |
getObject(java.lang.String parameterName,
java.util.Map typeMap)
Returns the value of an output parameter as a Java Object.
|
java.sql.Ref |
getRef(int parameterIndex)
Returns the value of an SQL REF output parameter as a Ref value.
|
java.sql.Ref |
getRef(java.lang.String parameterName)
Returns the value of an SQL REF output parameter as a Ref value.
|
short |
getShort(int parameterIndex)
Returns the value of an SQL SMALLINT output parameter as a
Java short value.
|
short |
getShort(java.lang.String parameterName)
Returns the value of an SQL SMALLINT output parameter as a
Java short value.
|
java.lang.String |
getString(int parameterIndex)
Returns the value of an SQL CHAR or VARCHAR output
parameter as a Java String object.
|
java.lang.String |
getString(java.lang.String parameterName)
Returns the value of an SQL CHAR or VARCHAR output
parameter as a Java String object.
|
java.sql.Time |
getTime(int parameterIndex)
Returns the value of an SQL TIME output parameter as a
java.sql.Time object using the default calendar.
|
java.sql.Time |
getTime(int parameterIndex,
java.util.Calendar calendar)
Returns the value of an SQL TIME output parameter as a
java.sql.Time object using a calendar other than the
default.
|
java.sql.Time |
getTime(java.lang.String parameterName)
Returns the value of an SQL TIME output parameter as a
java.sql.Time object using the default calendar.
|
java.sql.Time |
getTime(java.lang.String parameterName,
java.util.Calendar calendar)
Returns the value of an SQL TIME output parameter as a
java.sql.Time object using a calendar other than the
default.
|
java.sql.Timestamp |
getTimestamp(int parameterIndex)
Returns the value of an SQL TIMESTAMP output parameter as a
java.sql.Timestamp object using the default calendar.
|
java.sql.Timestamp |
getTimestamp(int parameterIndex,
java.util.Calendar calendar)
Returns the value of an SQL TIMESTAMP output parameter as a
java.sql.Timestamp object using a calendar other than the
default.
|
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName)
Returns the value of an SQL TIMESTAMP output parameter as a
java.sql.Timestamp object using the default calendar.
|
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName,
java.util.Calendar calendar)
Returns the value of an SQL TIMESTAMP output parameter as a
java.sql.Timestamp object using a calendar other than the
default.
|
java.net.URL |
getURL(int parameterIndex)
Returns the value of an SQL DATALINK output parameter as a
java.net.URL object.
|
java.net.URL |
getURL(java.lang.String parameterName)
Returns the value of an SQL DATALINK output parameter as a
java.net.URL object.
|
protected java.lang.String[] |
getValidWrappedList() |
void |
registerOutParameter(int parameterIndex,
int sqlType)
Registers the type for an output parameter.
|
void |
registerOutParameter(int parameterIndex,
int sqlType,
int scale)
Registers the type for an output parameter.
|
void |
registerOutParameter(int parameterIndex,
int sqlType,
java.lang.String typeName)
Registers the type for an output parameter.
|
void |
registerOutParameter(int parameterIndex,
java.lang.Object sqlType)
Registers the OUT parameter in ordinal position parameterIndex to the JDBC type
sqlType.
|
void |
registerOutParameter(int parameterIndex,
java.lang.Object sqlType,
int scale)
Registers the parameter in ordinal position parameterIndex to be
of JDBC type sqlType.
|
void |
registerOutParameter(int parameterIndex,
java.lang.Object sqlType,
java.lang.String typeName)
Registers the designated output parameter.
|
void |
registerOutParameter(java.lang.String parameterName,
int sqlType)
Registers the type for an output parameter.
|
void |
registerOutParameter(java.lang.String parameterName,
int sqlType,
int scale)
Registers the type for an output parameter.
|
void |
registerOutParameter(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
Registers the type for an output parameter.
|
void |
registerOutParameter(java.lang.String parameterName,
java.lang.Object sqlType)
Registers the OUT parameter named parameterName to the JDBC type sqlType.
|
void |
registerOutParameter(java.lang.String parameterName,
java.lang.Object sqlType,
int scale)
Registers the parameter named parameterName to be of JDBC type sqlType.
|
void |
registerOutParameter(java.lang.String parameterName,
java.lang.Object sqlType,
java.lang.String typeName)
Registers the designated output parameter.
|
void |
setAsciiStream(java.lang.String parameterName,
java.io.InputStream x)
Sets the designated parameter to the given input stream.
|
void |
setAsciiStream(java.lang.String parameterName,
java.io.InputStream parameterValue,
int length)
Sets an input parameter to an ASCII stream value.
|
void |
setAsciiStream(java.lang.String parameterName,
java.io.InputStream x,
long length)
Sets the designated parameter to the given input stream, which will have
the specified number of bytes.
|
void |
setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal parameterValue)
Sets an input parameter to a BigDecimal value.
|
void |
setBinaryStream(java.lang.String parameterName,
java.io.InputStream x)
Sets the designated parameter to the given input stream.
|
void |
setBinaryStream(java.lang.String parameterName,
java.io.InputStream parameterValue,
int length)
Sets an input parameter to a binary stream value.
|
void |
setBinaryStream(java.lang.String parameterName,
java.io.InputStream x,
long length)
Sets the designated parameter to the given input stream, which will have
the specified number of bytes.
|
void |
setBlob(java.lang.String parameterName,
java.sql.Blob x)
Sets the designated parameter to the given
java.sql.Blob object. |
void |
setBlob(java.lang.String parameterName,
java.io.InputStream inputStream)
Sets the designated parameter to a
InputStream object. |
void |
setBlob(java.lang.String parameterName,
java.io.InputStream inputStream,
long length)
Sets the designated parameter to a
InputStream object. |
void |
setBoolean(java.lang.String parameterName,
boolean parameterValue)
Sets an input parameter to a Java boolean value.
|
void |
setByte(java.lang.String parameterName,
byte parameterValue)
Sets an input parameter to a Java byte value.
|
void |
setBytes(java.lang.String parameterName,
byte[] parameterValue)
Sets an input parameter to a Java byte array value.
|
void |
setCharacterStream(java.lang.String parameterName,
java.io.Reader reader)
Sets the designated parameter to the given
Reader
object. |
void |
setCharacterStream(java.lang.String parameterName,
java.io.Reader parameterValue,
int length)
Sets an input parameter to a character stream value.
|
void |
setCharacterStream(java.lang.String parameterName,
java.io.Reader reader,
long length)
Sets the designated parameter to the given
Reader
object, which is the given number of characters long. |
void |
setClob(java.lang.String parameterName,
java.sql.Clob x)
Sets the designated parameter to the given
java.sql.Clob object. |
void |
setClob(java.lang.String parameterName,
java.io.Reader reader)
Sets the designated parameter to a
Reader object. |
void |
setClob(java.lang.String parameterName,
java.io.Reader reader,
long length)
Sets the designated parameter to a
Reader object. |
void |
setDate(java.lang.String parameterName,
java.sql.Date parameterValue)
Sets an input parameter to a java.sql.Date value using the
default calendar.
|
void |
setDate(java.lang.String parameterName,
java.sql.Date parameterValue,
java.util.Calendar cal)
Sets an input parameter to a java.sql.Date value using a
calendar other than the default.
|
void |
setDouble(java.lang.String parameterName,
double parameterValue)
Sets an input parameter to a Java double value.
|
void |
setFloat(java.lang.String parameterName,
float parameterValue)
Sets an input parameter to a Java float value.
|
void |
setInt(java.lang.String parameterName,
int parameterValue)
Sets an input parameter to a Java int value.
|
void |
setLong(java.lang.String parameterName,
long parameterValue)
Sets an input parameter to a Java long value.
|
void |
setNCharacterStream(java.lang.String parameterName,
java.io.Reader value)
Sets the designated parameter to a
Reader object. |
void |
setNCharacterStream(java.lang.String parameterName,
java.io.Reader value,
long length)
Sets the designated parameter to a
Reader object. |
void |
setNClob(java.lang.String parameterName,
java.io.Reader reader)
Sets the designated parameter to a
Reader object. |
void |
setNClob(java.lang.String parameterName,
java.io.Reader reader,
long length)
Sets the designated parameter to a
Reader object. |
void |
setNString(java.lang.String parameterName,
java.lang.String value)
Sets the designated parameter to the given
String object. |
void |
setNull(java.lang.String parameterName,
int sqlType)
Sets an input parameter to SQL NULL.
|
void |
setNull(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
Sets an input parameter to SQL NULL.
|
void |
setObject(java.lang.String parameterName,
java.lang.Object parameterValue)
Sets an input parameter to an Object value.
|
void |
setObject(java.lang.String parameterName,
java.lang.Object parameterValue,
int targetSqlType)
Sets an input parameter to an Object value.
|
void |
setObject(java.lang.String parameterName,
java.lang.Object parameterValue,
int targetSqlType,
int scale)
Sets an input parameter to an Object value.
|
void |
setObject(java.lang.String parameterName,
java.lang.Object x,
java.lang.Object targetSqlType)
Sets the value of the designated parameter with the given object.
|
void |
setObject(java.lang.String parameterName,
java.lang.Object x,
java.lang.Object targetSqlType,
int scaleOrLength)
Sets the value of the designated parameter with the given object.
|
void |
setShort(java.lang.String parameterName,
short parameterValue)
Sets an input parameter to a Java short value.
|
void |
setString(java.lang.String parameterName,
java.lang.String parameterValue)
Sets an input parameter to a String value.
|
void |
setTime(java.lang.String parameterName,
java.sql.Time parameterValue)
Sets an input parameter to a java.sql.Time value using the
default calendar.
|
void |
setTime(java.lang.String parameterName,
java.sql.Time parameterValue,
java.util.Calendar cal)
Sets an input parameter to a java.sql.Time value using a calendar
other than the default.
|
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp parameterValue)
Sets an input parameter to a java.sql.Timestamp value using the
default calendar.
|
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp parameterValue,
java.util.Calendar cal)
Sets an input parameter to a java.sql.Timestamp value using a
calendar other than the default.
|
void |
setURL(java.lang.String parameterName,
java.net.URL parameterValue)
Sets an input parameter to a URL value.
|
boolean |
wasNull()
Indicates if the last parameter read has the
value of SQL NULL.
|
addBatch, addBatch, clearParameters, close, execute, execute, execute, execute, execute, executeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getDB2ParameterName, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDB2Default, setDB2Unassigned, setDBDefault, setDBUnassigned, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURLcancel, clearBatch, clearWarnings, closeOnCompletion, endCancelThread, executeLargeBatch, finalize, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getPositionOfSyntaxError, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, startCancelThread, toStringclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNClob, getNClob, getRowId, getRowId, getSQLXML, getSQLXML, setNClob, setRowId, setSQLXMLaddBatch, clearParameters, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURLaddBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutpublic java.sql.Array getArray(int parameterIndex)
throws java.sql.SQLException
getArray in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Array getArray(java.lang.String parameterName)
throws java.sql.SQLException
getArray in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.math.BigDecimal getBigDecimal(int parameterIndex)
throws java.sql.SQLException
getBigDecimal in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.math.BigDecimal getBigDecimal(int parameterIndex,
int scale)
throws java.sql.SQLException
getBigDecimal in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).scale - The number of digits after the decimal.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the scale is not valid,
the statement was not executed, or
the requested conversion is not valid.getBigDecimal(int)public java.math.BigDecimal getBigDecimal(java.lang.String parameterName)
throws java.sql.SQLException
getBigDecimal in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Blob getBlob(int parameterIndex)
throws java.sql.SQLException
getBlob in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Blob getBlob(java.lang.String parameterName)
throws java.sql.SQLException
getBlob in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public boolean getBoolean(int parameterIndex)
throws java.sql.SQLException
getBoolean in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public boolean getBoolean(java.lang.String parameterName)
throws java.sql.SQLException
getBoolean in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public byte getByte(int parameterIndex)
throws java.sql.SQLException
getByte in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid,
or an error occurs.public byte getByte(java.lang.String parameterName)
throws java.sql.SQLException
getByte in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid,
or an error occurs.public byte[] getBytes(int parameterIndex)
throws java.sql.SQLException
getBytes in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public byte[] getBytes(java.lang.String parameterName)
throws java.sql.SQLException
getBytes in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Clob getClob(int parameterIndex)
throws java.sql.SQLException
getClob in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Clob getClob(java.lang.String parameterName)
throws java.sql.SQLException
getClob in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Date getDate(int parameterIndex)
throws java.sql.SQLException
getDate in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Date getDate(int parameterIndex,
java.util.Calendar calendar)
throws java.sql.SQLException
getDate in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).calendar - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed,
the calendar is null, or
the requested conversion is not valid.public java.sql.Date getDate(java.lang.String parameterName)
throws java.sql.SQLException
getDate in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Date getDate(java.lang.String parameterName,
java.util.Calendar calendar)
throws java.sql.SQLException
getDate in interface java.sql.CallableStatementparameterName - The parameter name.calendar - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed,
the calendar is null, or
the requested conversion is not valid.public double getDouble(int parameterIndex)
throws java.sql.SQLException
getDouble in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public double getDouble(java.lang.String parameterName)
throws java.sql.SQLException
getDouble in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public float getFloat(int parameterIndex)
throws java.sql.SQLException
getFloat in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public float getFloat(java.lang.String parameterName)
throws java.sql.SQLException
getFloat in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public int getInt(int parameterIndex)
throws java.sql.SQLException
getInt in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public int getInt(java.lang.String parameterName)
throws java.sql.SQLException
getInt in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public long getLong(int parameterIndex)
throws java.sql.SQLException
getLong in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public long getLong(java.lang.String parameterName)
throws java.sql.SQLException
getLong in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.lang.Object getObject(int parameterIndex)
throws java.sql.SQLException
getObject in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.lang.Object getObject(int parameterIndex,
java.util.Map typeMap)
throws java.sql.SQLException
getObject in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).typeMap - The type map. This is not used.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.lang.Object getObject(java.lang.String parameterName)
throws java.sql.SQLException
getObject in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.lang.Object getObject(java.lang.String parameterName,
java.util.Map typeMap)
throws java.sql.SQLException
getObject in interface java.sql.CallableStatementparameterName - The parameter name.typeMap - The type map. This is not used.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Ref getRef(int parameterIndex)
throws java.sql.SQLException
getRef in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - Always thrown because DB2 for IBM i does not support REFs.public java.sql.Ref getRef(java.lang.String parameterName)
throws java.sql.SQLException
getRef in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - Always thrown because DB2 for IBM i does not support REFs.public short getShort(int parameterIndex)
throws java.sql.SQLException
getShort in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public short getShort(java.lang.String parameterName)
throws java.sql.SQLException
getShort in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.lang.String getString(int parameterIndex)
throws java.sql.SQLException
getString in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.lang.String getString(java.lang.String parameterName)
throws java.sql.SQLException
getString in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Time getTime(int parameterIndex)
throws java.sql.SQLException
getTime in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Time getTime(int parameterIndex,
java.util.Calendar calendar)
throws java.sql.SQLException
getTime in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).calendar - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed,
the calendar is null, or
the requested conversion is not valid.public java.sql.Time getTime(java.lang.String parameterName)
throws java.sql.SQLException
getTime in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Time getTime(java.lang.String parameterName,
java.util.Calendar calendar)
throws java.sql.SQLException
getTime in interface java.sql.CallableStatementparameterName - The parameter name.calendar - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed,
the calendar is null, or
the requested conversion is not valid.public java.sql.Timestamp getTimestamp(int parameterIndex)
throws java.sql.SQLException
getTimestamp in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Timestamp getTimestamp(int parameterIndex,
java.util.Calendar calendar)
throws java.sql.SQLException
getTimestamp in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).calendar - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the index is
not registered as an output parameter,
the statement was not executed,
the calendar is null, or
the requested conversion is not valid.public java.sql.Timestamp getTimestamp(java.lang.String parameterName)
throws java.sql.SQLException
getTimestamp in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed, or
the requested conversion is not valid.public java.sql.Timestamp getTimestamp(java.lang.String parameterName,
java.util.Calendar calendar)
throws java.sql.SQLException
getTimestamp in interface java.sql.CallableStatementparameterName - The parameter name.calendar - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed,
the calendar is null, or
the requested conversion is not valid.public java.net.URL getURL(int parameterIndex)
throws java.sql.SQLException
getURL in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed or
the requested conversion is not valid.public java.net.URL getURL(java.lang.String parameterName)
throws java.sql.SQLException
getURL in interface java.sql.CallableStatementparameterName - The parameter name.java.sql.SQLException - If the statement is not open,
the name is not valid, the parameter name is
not registered as an output parameter,
the statement was not executed or
the requested conversion is not valid.public void registerOutParameter(int parameterIndex,
int sqlType,
int scale)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).sqlType - The SQL type code defined in java.sql.Types.scale - The number of digits after the decimal
if sqlType is DECIMAL or NUMERIC.java.sql.SQLException - If the index is not valid,
the scale is not valid,
the parameter is not an output parameter,
or the requested conversion is not valid.public void registerOutParameter(int parameterIndex,
int sqlType)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).sqlType - The SQL type code defined in java.sql.Types.java.sql.SQLException - If the index is not valid,
the parameter is not an output parameter,
or the requested conversion is not valid.public void registerOutParameter(int parameterIndex,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterIndex - The parameter index (1-based).sqlType - The SQL type code defined in java.sql.Types.typeName - The fully-qualified name of an SQL structured type. This value will be ignored.java.sql.SQLException - If the index is not valid,
the parameter is not an output parameter,
or the requested conversion is not valid.public void registerOutParameter(java.lang.String parameterName,
int sqlType)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterName - The parameter name.sqlType - The SQL type code defined in java.sql.Types.java.sql.SQLException - If the index is not valid,
the parameter is not an output parameter,
or the requested conversion is not valid.public void registerOutParameter(java.lang.String parameterName,
int sqlType,
int scale)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterName - The parameter name.sqlType - The SQL type code defined in java.sql.Types.scale - The number of digits after the decimal
if sqlType is DECIMAL or NUMERIC.java.sql.SQLException - If the index is not valid,
the scale is not valid,
the parameter is not an output parameter,
or the requested conversion is not valid.public void registerOutParameter(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterName - The parameter name.sqlType - The SQL type code defined in java.sql.Types.typeName - The fully-qualified name of an SQL structured type. This value will be ignored.java.sql.SQLException - If the index is not valid,
the parameter is not an output parameter,
or the requested conversion is not valid.public void setAsciiStream(java.lang.String parameterName,
java.io.InputStream parameterValue,
int length)
throws java.sql.SQLException
setAsciiStream in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.length - The number of bytes in the stream.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter
is not an input parameter,
the length is not valid,
the input stream does not contain all
ASCII characters, or an error occurs
while reading the input stream.public void setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal parameterValue)
throws java.sql.SQLException
setBigDecimal in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.java.sql.SQLException - If the statement is not open,
the index is not valid, or the parameter
is not an input parameter.public void setBinaryStream(java.lang.String parameterName,
java.io.InputStream parameterValue,
int length)
throws java.sql.SQLException
setBinaryStream in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.length - The number of bytes in the stream.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter
is not an input parameter,
the length is not valid, or
an error occurs while reading the
input stream.public void setBoolean(java.lang.String parameterName,
boolean parameterValue)
throws java.sql.SQLException
setBoolean in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value.java.sql.SQLException - If the statement is not open,
the parameterName is not valid, or
the parameter is not an input parameter.public void setByte(java.lang.String parameterName,
byte parameterValue)
throws java.sql.SQLException
setByte in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or
the parameter is not an input parameter.public void setBytes(java.lang.String parameterName,
byte[] parameterValue)
throws java.sql.SQLException
setBytes in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or the parameter
is not an input parameter.public void setCharacterStream(java.lang.String parameterName,
java.io.Reader parameterValue,
int length)
throws java.sql.SQLException
setCharacterStream in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.length - The number of bytes in the reader.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter
is not an input parameter,
the length is not valid,
or an error occurs while reading the
character streampublic void setDate(java.lang.String parameterName,
java.sql.Date parameterValue)
throws java.sql.SQLException
setDate in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or the parameter
is not an input parameter.public void setDate(java.lang.String parameterName,
java.sql.Date parameterValue,
java.util.Calendar cal)
throws java.sql.SQLException
setDate in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.cal - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter
is not an input parameter,
or the calendar is null.public void setDouble(java.lang.String parameterName,
double parameterValue)
throws java.sql.SQLException
setDouble in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value.java.sql.SQLException - If the statement is not open,
the parameter name is not valid or
the parameter is not an input parameter.public void setFloat(java.lang.String parameterName,
float parameterValue)
throws java.sql.SQLException
setFloat in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or
the parameter is not an input parameter.public void setInt(java.lang.String parameterName,
int parameterValue)
throws java.sql.SQLException
setInt in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value.java.sql.SQLException - If the statement is not open,
the parameter name is not valid or
the parameter is not an input parameter.public void setLong(java.lang.String parameterName,
long parameterValue)
throws java.sql.SQLException
setLong in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or
the parameter is not an input parameter.public void setNull(java.lang.String parameterName,
int sqlType)
throws java.sql.SQLException
setNull in interface java.sql.CallableStatementparameterName - The parameter name.sqlType - The SQL type code defined in java.sql.Types.java.sql.SQLException - If the statement is not open,
the parameterName is not valid,
the parameter is not an input parameter,
or the SQL type is not valid.public void setNull(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
setNull in interface java.sql.CallableStatementparameterName - The parameter name.sqlType - The SQL type code defined in java.sql.Types.typeName - The fully-qualified name of an SQL structured type. This value will be ignored.java.sql.SQLException - If the statement is not open,
the index is not valid,
the parameter is not an input parameter,
or the SQL type is not valid.public void setObject(java.lang.String parameterName,
java.lang.Object parameterValue)
throws java.sql.SQLException
setObject in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.java.sql.SQLException - If the statement is not open,
the index is not valid,
the parameter is not an input parameter,
the type of value is not supported,
or the parameter is not serializable
(when proxy support is in use).public void setObject(java.lang.String parameterName,
java.lang.Object parameterValue,
int targetSqlType)
throws java.sql.SQLException
setObject in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.targetSqlType - The SQL type code defined in java.sql.Types.java.sql.SQLException - If the statement is not open,
the index is not valid,
the parameter is not an input parameter,
the SQL type is not valid,
the scale is not valid,
or the parameter is not serializable
(when proxy support is in use).public void setObject(java.lang.String parameterName,
java.lang.Object parameterValue,
int targetSqlType,
int scale)
throws java.sql.SQLException
setObject in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.targetSqlType - The SQL type code defined in java.sql.Types.scale - The number of digits after the decimal
if sqlType is DECIMAL or NUMERIC.java.sql.SQLException - If the statement is not open,
the index is not valid,
the parameter is not an input parameter,
the SQL type is not valid,
the scale is not valid,
or the parameter is not serializable
(when proxy support is in use).public void setShort(java.lang.String parameterName,
short parameterValue)
throws java.sql.SQLException
setShort in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value.java.sql.SQLException - If the statement is not open,
the parameter name is not valid or
the parameter is not an input parameter.public void setString(java.lang.String parameterName,
java.lang.String parameterValue)
throws java.sql.SQLException
setString in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or the parameter
is not an input parameter.public void setTime(java.lang.String parameterName,
java.sql.Time parameterValue)
throws java.sql.SQLException
setTime in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or the parameter
is not an input parameter.public void setTime(java.lang.String parameterName,
java.sql.Time parameterValue,
java.util.Calendar cal)
throws java.sql.SQLException
setTime in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.cal - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter
is not an input parameter,
or the calendar is null.public void setTimestamp(java.lang.String parameterName,
java.sql.Timestamp parameterValue)
throws java.sql.SQLException
setTimestamp in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or the parameter
is not an input parameter.public void setTimestamp(java.lang.String parameterName,
java.sql.Timestamp parameterValue,
java.util.Calendar cal)
throws java.sql.SQLException
setTimestamp in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.cal - The calendar.java.sql.SQLException - If the statement is not open,
the index is not valid, the parameter
is not an input parameter,
or the calendar is null.public void setURL(java.lang.String parameterName,
java.net.URL parameterValue)
throws java.sql.SQLException
setURL in interface java.sql.CallableStatementparameterName - The parameter name.parameterValue - The parameter value or null to set
the value to SQL NULL.java.sql.SQLException - If the statement is not open,
the parameter name is not valid, or the parameter
is not an input parameter.public boolean wasNull()
throws java.sql.SQLException
wasNull in interface java.sql.CallableStatementjava.sql.SQLException - If the statement is not open.protected java.lang.String[] getValidWrappedList()
getValidWrappedList in class AS400JDBCPreparedStatementImplpublic java.io.Reader getCharacterStream(int parameterIndex)
throws java.sql.SQLException
java.io.Reader object in the Java programming language.getCharacterStream in interface java.sql.CallableStatementparameterIndex - the first parameter is 1, the second is 2, ...java.io.Reader object that contains the parameter
value; if the value is SQL NULL, the value returned is
null in the Java programming language.java.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic java.io.Reader getCharacterStream(java.lang.String parameterName)
throws java.sql.SQLException
java.io.Reader object in the Java programming language.getCharacterStream in interface java.sql.CallableStatementparameterName - the name of the parameterjava.io.Reader object that contains the parameter
value; if the value is SQL NULL, the value returned is
null in the Java programming languagejava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic java.io.Reader getNCharacterStream(int parameterIndex)
throws java.sql.SQLException
java.io.Reader object in the Java programming language.
It is intended for use when
accessing NCHAR,NVARCHAR
and LONGNVARCHAR parameters.getNCharacterStream in interface java.sql.CallableStatementparameterIndex - the first parameter is 1, the second is 2, ...java.io.Reader object that contains the parameter
value; if the value is SQL NULL, the value returned is
null in the Java programming language.java.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic java.io.Reader getNCharacterStream(java.lang.String parameterName)
throws java.sql.SQLException
java.io.Reader object in the Java programming language.
It is intended for use when
accessing NCHAR,NVARCHAR
and LONGNVARCHAR parameters.getNCharacterStream in interface java.sql.CallableStatementparameterName - the name of the parameterjava.io.Reader object that contains the parameter
value; if the value is SQL NULL, the value returned is
null in the Java programming languagejava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic java.lang.String getNString(int parameterIndex)
throws java.sql.SQLException
NCHAR,
NVARCHAR
or LONGNVARCHAR parameter as
a String in the Java programming language.
For the fixed-length type JDBC NCHAR,
the String object
returned has exactly the same value the SQL
NCHAR value had in the
database, including any padding added by the database.
getNString in interface java.sql.CallableStatementparameterIndex - index of the first parameter is 1, the second is 2, ...String object that maps an
NCHAR, NVARCHAR or LONGNVARCHAR valuejava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementsetNString(java.lang.String, java.lang.String)public java.lang.String getNString(java.lang.String parameterName)
throws java.sql.SQLException
NCHAR,
NVARCHAR
or LONGNVARCHAR parameter as
a String in the Java programming language.
For the fixed-length type JDBC NCHAR,
the String object
returned has exactly the same value the SQL
NCHAR value had in the
database, including any padding added by the database.
getNString in interface java.sql.CallableStatementparameterName - the name of the parameterString object that maps an
NCHAR, NVARCHAR or LONGNVARCHAR valuejava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementsetNString(java.lang.String, java.lang.String)public void setAsciiStream(java.lang.String parameterName,
java.io.InputStream x,
long length)
throws java.sql.SQLException
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream. Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setAsciiStream in interface java.sql.CallableStatementparameterName - the name of the parameterx - the Java input stream that contains the ASCII parameter valuelength - the number of bytes in the streamjava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic void setBinaryStream(java.lang.String parameterName,
java.io.InputStream x,
long length)
throws java.sql.SQLException
LONGVARBINARY
parameter, it may be more practical to send it via a
java.io.InputStream object. The data will be read from the stream
as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setBinaryStream in interface java.sql.CallableStatementparameterName - the name of the parameterx - the java input stream which contains the binary parameter valuelength - the number of bytes in the streamjava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic void setBlob(java.lang.String parameterName,
java.sql.Blob x)
throws java.sql.SQLException
java.sql.Blob object.
The driver converts this to an SQL BLOB value when it
sends it to the database.setBlob in interface java.sql.CallableStatementparameterName - the name of the parameterx - a Blob object that maps an SQL BLOB valuejava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic void setBlob(java.lang.String parameterName,
java.io.InputStream inputStream,
long length)
throws java.sql.SQLException
InputStream object. The InputStream must contain the number
of characters specified by length, otherwise a SQLException will be
generated when the CallableStatement is executed.
This method differs from the setBinaryStream (int, InputStream, int)
method because it informs the driver that the parameter value should be
sent to the system as a BLOB. When the setBinaryStream method is used,
the driver may have to do extra work to determine whether the parameter
data should be sent to the system as a LONGVARBINARY or a BLOBsetBlob in interface java.sql.CallableStatementparameterName - the name of the parameter to be setinputStream - An object that contains the data to set the parameter
value to.length - the number of bytes in the parameter data.java.sql.SQLException - if parameterIndex does not correspond
to a parameter marker in the SQL statement, or if the length specified
is less than zero; if the number of bytes in the inputStream does not match
the specfied length; if a database access error occurs or
this method is called on a closed CallableStatementpublic void setCharacterStream(java.lang.String parameterName,
java.io.Reader reader,
long length)
throws java.sql.SQLException
Reader
object, which is the given number of characters long.
When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.Reader object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setCharacterStream in interface java.sql.CallableStatementparameterName - the name of the parameterreader - the java.io.Reader object that
contains the UNICODE data used as the designated parameterlength - the number of characters in the streamjava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic void setClob(java.lang.String parameterName,
java.sql.Clob x)
throws java.sql.SQLException
java.sql.Clob object.
The driver converts this to an SQL CLOB value when it
sends it to the database.setClob in interface java.sql.CallableStatementparameterName - the name of the parameterx - a Clob object that maps an SQL CLOB valuejava.sql.SQLException - if a database access error occurs or
this method is called on a closed CallableStatementpublic void setClob(java.lang.String parameterName,
java.io.Reader reader,
long length)
throws java.sql.SQLException
Reader object. The reader must contain the number
of characters specified by length otherwise a SQLException will be
generated when the CallableStatement is executed.
This method differs from the setCharacterStream (int, Reader, int) method
because it informs the driver that the parameter value should be sent to
the system as a CLOB. When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter
data should be sent to the system as a LONGVARCHAR or a CLOBsetClob in interface java.sql.CallableStatementparameterName - the name of the parameter to be setreader - An object that contains the data to set the parameter value to.length - the number of characters in the parameter data.java.sql.SQLException - if parameterIndex does not correspond to a parameter
marker in the SQL statement; if the length specified is less than zero;
a database access error occurs or
this method is called on a closed CallableStatementpublic void setNCharacterStream(java.lang.String parameterName,
java.io.Reader value,
long length)
throws java.sql.SQLException
Reader object. The
Reader reads the data till end-of-file is reached. The
driver does the necessary conversion from Java character format to
the national character set in the database.setNCharacterStream in interface java.sql.CallableStatementparameterName - the name of the parameter to be setvalue - the parameter valuelength - the number of characters in the parameter data.java.sql.SQLException - if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; if a database access error occurs or
this method is called on a closed CallableStatementpublic void setNClob(java.lang.String parameterName,
java.io.Reader reader,
long length)
throws java.sql.SQLException
Reader object. The reader must contain the number
of characters specified by length otherwise a SQLException will be
generated when the CallableStatement is executed.
This method differs from the setCharacterStream (int, Reader, int) method
because it informs the driver that the parameter value should be sent to
the system as a NCLOB. When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter
data should be sent to the system as a LONGNVARCHAR or a NCLOBsetNClob in interface java.sql.CallableStatementparameterName - the name of the parameter to be setreader - An object that contains the data to set the parameter value to.length - the number of characters in the parameter data.java.sql.SQLException - if parameterIndex does not correspond to a parameter
marker in the SQL statement; if the length specified is less than zero;
if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; if a database access error occurs or
this method is called on a closed CallableStatementpublic void setNString(java.lang.String parameterName,
java.lang.String value)
throws java.sql.SQLException
String object.
The driver converts this to a SQL NCHAR or
NVARCHAR or LONGNVARCHARsetNString in interface java.sql.CallableStatementparameterName - the name of the parameter to be setvalue - the parameter valuejava.sql.SQLException - if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; if a database access error occurs or
this method is called on a closed CallableStatementpublic void setAsciiStream(java.lang.String parameterName,
java.io.InputStream x)
throws java.sql.SQLException
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream. Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setAsciiStream which takes a length parameter.
setAsciiStream in interface java.sql.CallableStatementparameterName - the name of the parameterx - the Java input stream that contains the ASCII parameter valuejava.sql.SQLException - if parameterName does not correspond to a named
parameter; if a database access error occurs or
this method is called on a closed CallableStatementpublic void setBinaryStream(java.lang.String parameterName,
java.io.InputStream x)
throws java.sql.SQLException
LONGVARBINARY
parameter, it may be more practical to send it via a
java.io.InputStream object. The data will be read from the
stream as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setBinaryStream which takes a length parameter.
setBinaryStream in interface java.sql.CallableStatementparameterName - the name of the parameterx - the java input stream which contains the binary parameter valuejava.sql.SQLException - if parameterName does not correspond to a named
parameter; if a database access error occurs or
this method is called on a closed CallableStatementpublic void setBlob(java.lang.String parameterName,
java.io.InputStream inputStream)
throws java.sql.SQLException
InputStream object.
This method differs from the setBinaryStream (int, InputStream)
method because it informs the driver that the parameter value should be
sent to the system as a BLOB. When the setBinaryStream method is used,
the driver may have to do extra work to determine whether the parameter
data should be sent to the system as a LONGVARBINARY or a BLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setBlob which takes a length parameter.
setBlob in interface java.sql.CallableStatementparameterName - the name of the parameterinputStream - An object that contains the data to set the parameter
value to.java.sql.SQLException - if parameterName does not correspond to a named
parameter; if a database access error occurs or
this method is called on a closed CallableStatementpublic void setCharacterStream(java.lang.String parameterName,
java.io.Reader reader)
throws java.sql.SQLException
Reader
object.
When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.Reader object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setCharacterStream which takes a length parameter.
setCharacterStream in interface java.sql.CallableStatementparameterName - the name of the parameterreader - the java.io.Reader object that contains the
Unicode datajava.sql.SQLException - if parameterName does not correspond to a named
parameter; if a database access error occurs or
this method is called on a closed CallableStatementpublic void setClob(java.lang.String parameterName,
java.io.Reader reader)
throws java.sql.SQLException
Reader object.
This method differs from the setCharacterStream (int, Reader) method
because it informs the driver that the parameter value should be sent to
the system as a CLOB. When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter
data should be sent to the system as a LONGVARCHAR or a CLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setClob which takes a length parameter.
setClob in interface java.sql.CallableStatementparameterName - the name of the parameterreader - An object that contains the data to set the parameter value to.java.sql.SQLException - if parameterName does not correspond to a named
parameter; if a database access error occurs or this method is called on
a closed CallableStatementpublic void setNCharacterStream(java.lang.String parameterName,
java.io.Reader value)
throws java.sql.SQLException
Reader object. The
Reader reads the data till end-of-file is reached. The
driver does the necessary conversion from Java character format to
the national character set in the database.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setNCharacterStream which takes a length parameter.
setNCharacterStream in interface java.sql.CallableStatementparameterName - the name of the parametervalue - the parameter valuejava.sql.SQLException - if parameterName does not correspond to a named
parameter; if the driver does not support national
character sets; if the driver can detect that a data conversion
error could occur; if a database access error occurs; or
this method is called on a closed CallableStatementpublic void setNClob(java.lang.String parameterName,
java.io.Reader reader)
throws java.sql.SQLException
Reader object.
This method differs from the setCharacterStream (int, Reader) method
because it informs the driver that the parameter value should be sent to
the system as a NCLOB. When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter
data should be sent to the system as a LONGNVARCHAR or a NCLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
setNClob which takes a length parameter.
setNClob in interface java.sql.CallableStatementparameterName - the name of the parameterreader - An object that contains the data to set the parameter value to.java.sql.SQLException - if parameterName does not correspond to a named
parameter; if the driver does not support national character sets;
if the driver can detect that a data conversion
error could occur; if a database access error occurs or
this method is called on a closed CallableStatementpublic java.lang.Object getObject(int parameterIndex,
java.lang.Class type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object getObject(java.lang.String parameterName,
java.lang.Class type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setObject(java.lang.String parameterName,
java.lang.Object x,
java.lang.Object targetSqlType,
int scaleOrLength)
throws java.sql.SQLException
The given Java object will be converted to the given targetSqlType before being sent to the database. If the object has a custom mapping (is of a class implementing the interface SQLData), the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, NClob, Struct, java.net.URL, or Array, the driver should pass it to the database as a value of the corresponding SQL type.
Note that this method may be used to pass database-specific abstract data types.
parameterName - - the name of the parameterx - - the object containing the input parameter valuetargetSqlType - - the SQL type to be sent to the database. The scale argument
may further qualify this type.scaleOrLength - - for java.sql.JDBCType.DECIMAL or java.sql.JDBCType.NUMERIC
types, this is the number of digits after the decimal point. For Java Object
types InputStream and Reader, this is the length of the data in the stream or
reader. For all other types, this value will be ignored.java.sql.SQLException - - if parameterName does not correspond to a named parameter;
if a database access error occurs or this method is called on a closed
CallableStatement or if the Java Object specified by x is an InputStream or
Reader object and the value of the scale parameter is less than zeropublic void setObject(java.lang.String parameterName,
java.lang.Object x,
java.lang.Object targetSqlType)
throws java.sql.SQLException
parameterName - - the name of the parameterx - - the object containing the input parameter valuetargetSqlType - - the SQL type to be sent to the databasejava.sql.SQLException - - if parameterName does not correspond to a named parameter;
if a database access error occurs or this method is called on a closed
CallableStatementpublic void registerOutParameter(int parameterIndex,
java.lang.Object sqlType)
throws java.sql.SQLException
The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.
If the JDBC type expected to be returned to this output parameter is specific to this particular database, sqlType may be JDBCType.OTHER or a SQLType that is supported by the JDBC driver. The method getObject(int) retrieves the value.
parameterIndex - - the first parameter is 1, the second is 2, and so onsqlType - - the JDBC type code defined by SQLType to use to register
the OUT Parameter. If the parameter is of JDBC type JDBCType.NUMERIC
or JDBCType.DECIMAL, the version of registerOutParameter that accepts
a scale value should be used.java.sql.SQLException - - if the parameterIndex is not valid; if a database access
error occurs or this method is called on a closed CallableStatementpublic void registerOutParameter(int parameterIndex,
java.lang.Object sqlType,
int scale)
throws java.sql.SQLException
The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.
This version of registerOutParameter should be used when the parameter is of JDBC type JDBCType.NUMERIC or JDBCType.DECIMAL.
parameterIndex - - the first parameter is 1, the second is 2, and so onsqlType - - the JDBC type code defined by SQLType to use to register
the OUT Parameter.scale - - the desired number of digits to the right of the decimal
point. It must be greater than or equal to zero.java.sql.SQLException - - if the parameterIndex is not valid; if a database
access error occurs or this method is called on a closed CallableStatementpublic void registerOutParameter(int parameterIndex,
java.lang.Object sqlType,
java.lang.String typeName)
throws java.sql.SQLException
All OUT parameters must be registered before a stored procedure is executed.
For a user-defined parameter, the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-defined and REF parameters. Although it is intended for user-defined and REF parameters, this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the typeName parameter is ignored.
Note: When reading the value of an out parameter, you must use the getter method whose Java type corresponds to the parameter's registered SQL type.
parameterIndex - - the first parameter is 1, the second is 2,...sqlType - - the JDBC type code defined by SQLType to use to register
the OUT Parameter.typeName - - the fully-qualified name of an SQL structured typejava.sql.SQLException - - if the parameterIndex is not valid; if a database
access error occurs or this method is called on a closed CallableStatementpublic void registerOutParameter(java.lang.String parameterName,
java.lang.Object sqlType)
throws java.sql.SQLException
The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.
If the JDBC type expected to be returned to this output parameter is specific to this particular database, sqlType should be JDBCType.OTHER or a SQLType that is supported by the JDBC driver.. The method getObject(int) retrieves the value.
parameterName - - the name of the parametersqlType - - the JDBC type code defined by SQLType to use to register the
OUT Parameter. If the parameter is of JDBC type JDBCType.NUMERIC or
JDBCType.DECIMAL, the version of registerOutParameter that accepts a
scale value should be used.java.sql.SQLException - - if parameterName does not correspond to a named
parameter; if a database access error occurs or this method is called
on a closed CallableStatementpublic void registerOutParameter(java.lang.String parameterName,
java.lang.Object sqlType,
int scale)
throws java.sql.SQLException
The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.
This version of registerOutParameter should be used when the parameter is of JDBC type JDBCType.NUMERIC or JDBCType.DECIMAL.
parameterName - - the name of the parametersqlType - - the JDBC type code defined by SQLType to use to register
the OUT Parameter.scale - - the desired number of digits to the right of the decimal
point. It must be greater than or equal to zero.java.sql.SQLException - - if parameterName does not correspond to a named
parameter; if a database access error occurs or this method is called
on a closed CallableStatementpublic void registerOutParameter(java.lang.String parameterName,
java.lang.Object sqlType,
java.lang.String typeName)
throws java.sql.SQLException
All OUT parameters must be registered before a stored procedure is executed.
For a user-named parameter the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-named and REF parameters. Although it is intended for user-named and REF parameters, this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-named or REF type, the typeName parameter is ignored.
Note: When reading the value of an out parameter, you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.
parameterName - - the name of the parametersqlType - - the JDBC type code defined by SQLType to use to register
the OUT Parameter.typeName - - the fully-qualified name of an SQL structured typejava.sql.SQLException - - if parameterName does not correspond to a named
parameter; if a database access error occurs or this method is called
on a closed CallableStatement