|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--vortex.sql.vortexStatement
|
+--vortex.sql.vortexPreparedStatement
|
+--vortex.sql.vortexCallableStatement
CallableStatement is used to execute SQL stored procedures.
JDBC provides a stored procedure SQL escape that allows stored procedures to be called in a standard way for all RDBMS's. This escape syntax has one form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other parameters may be used for input, output or both. Parameters are refered to sequentially, by number. The first parameter is 1.
{?= call
{call
IN parameter values are set using the set methods inherited from PreparedStatement. The type of all OUT parameters must be registered prior to executing the stored procedure; their values are retrieved after execution via the get methods provided here.
A Callable statement may return a ResultSet or multiple ResultSets. Multiple ResultSets are handled using operations inherited from Statement.
Connection.prepareCall(java.lang.String),
ResultSet| Field Summary |
| Fields inherited from class vortex.sql.vortexPreparedStatement |
npa |
| Fields inherited from class vortex.sql.vortexStatement |
cName, conn, lcur, ldb, record, result |
| Fields inherited from interface java.sql.Statement |
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| Constructor Summary | |
vortexCallableStatement(java.sql.Connection c,
dbChannel db,
java.lang.String sql)
|
|
| Method Summary | |
int |
executeUpdate()
Execute a stored procedure. |
java.sql.Array |
getArray(int i)
JDBC 2.0 Gets the value of a JDBC ARRAY parameter as an Array object in the Java programming language. |
java.sql.Array |
getArray(java.lang.String parameterName)
Retrieves the value of a JDBC ARRAY parameter as an Array object in the Java programming language. |
java.math.BigDecimal |
getBigDecimal(int col)
JDBC 2.0 Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains. |
java.math.BigDecimal |
getBigDecimal(int col,
int scale)
Get the value of a NUMERIC parameter as a java.sql.Numeric object. |
java.math.BigDecimal |
getBigDecimal(java.lang.String parameterName)
Retrieves the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains. |
java.sql.Blob |
getBlob(int i)
JDBC 2.0 Gets the value of a JDBC BLOB parameter as a Blob object in the Java programming language. |
java.sql.Blob |
getBlob(java.lang.String parameterName)
Retrieves the value of a JDBC BLOB parameter as a Blob object in the Java programming language. |
boolean |
getBoolean(int col)
Get the value of a BIT parameter as a Java boolean. |
boolean |
getBoolean(java.lang.String parameterName)
Retrieves the value of a JDBC BIT parameter as a boolean in the Java programming language. |
byte |
getByte(int col)
Get the value of a TINYINT parameter as a Java byte. |
byte |
getByte(java.lang.String parameterName)
Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language. |
byte[] |
getBytes(int col)
Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[] |
byte[] |
getBytes(java.lang.String parameterName)
Retrieves the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language. |
java.sql.Clob |
getClob(int i)
JDBC 2.0 Gets the value of a JDBC CLOB parameter as a Clob object in the Java programming language. |
java.sql.Clob |
getClob(java.lang.String parameterName)
Retrieves the value of a JDBC CLOB parameter as a Clob object in the Java programming language. |
java.sql.Date |
getDate(int col)
Get the value of a SQL DATE parameter as a java.sql.Date object |
java.sql.Date |
getDate(int parameterIndex,
java.util.Calendar cal)
Gets the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date. |
java.sql.Date |
getDate(java.lang.String parameterName)
Retrieves the value of a JDBC DATE parameter as a java.sql.Date object. |
java.sql.Date |
getDate(java.lang.String parameterName,
java.util.Calendar cal)
Retrieves the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date. |
double |
getDouble(int col)
Get the value of a DOUBLE parameter as a Java double. |
double |
getDouble(java.lang.String parameterName)
Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language. |
float |
getFloat(int col)
Get the value of a FLOAT parameter as a Java float. |
float |
getFloat(java.lang.String parameterName)
Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language. |
int |
getInt(int col)
Get the value of a INTEGER parameter as a Java int. |
int |
getInt(java.lang.String parameterName)
Retrieves the value of a JDBC INTEGER parameter as an int in the Java programming language. |
long |
getLong(int col)
Get the value of a BIGINT parameter as a Java long. |
long |
getLong(java.lang.String parameterName)
Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language. |
java.lang.Object |
getObject(int i)
Get the value of a parameter as a Java object. |
java.lang.Object |
getObject(int i,
java.util.Map map)
JDBC 2.0 Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value. |
java.lang.Object |
getObject(java.lang.String parameterName)
Retrieves the value of a parameter as an Object in the Java programming language. |
java.lang.Object |
getObject(java.lang.String parameterName,
java.util.Map map)
Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value. |
java.sql.Ref |
getRef(int i)
JDBC 2.0 Gets the value of a JDBC REF( |
java.sql.Ref |
getRef(java.lang.String parameterName)
Retrieves the value of a JDBC REF( |
short |
getShort(int col)
Get the value of a SMALLINT parameter as a Java short. |
short |
getShort(java.lang.String parameterName)
Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language. |
java.lang.String |
getString(int col)
Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String. |
java.lang.String |
getString(java.lang.String parameterName)
Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language. |
java.sql.Time |
getTime(int col)
Get the value of a SQL TIME parameter as a java.sql.Time object. |
java.sql.Time |
getTime(int parameterIndex,
java.util.Calendar cal)
Gets the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time. |
java.sql.Time |
getTime(java.lang.String parameterName)
Retrieves the value of a JDBC TIME parameter as a java.sql.Time object. |
java.sql.Time |
getTime(java.lang.String parameterName,
java.util.Calendar cal)
Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time. |
java.sql.Timestamp |
getTimestamp(int col)
Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object. |
java.sql.Timestamp |
getTimestamp(int parameterIndex,
java.util.Calendar cal)
Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object. |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName)
Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object. |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName,
java.util.Calendar cal)
Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object. |
java.net.URL |
getURL(int parameterIndex)
Retrieves the value of the designated JDBC DATALINK parameter as a java.net.URL object. |
java.net.URL |
getURL(java.lang.String parameterName)
Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object. |
void |
registerOutParameter(int col,
int sqlType)
Before executing a stored procedure call you must explicitly call registerOutParameter to register the java.sql.Type of each out parameter. |
void |
registerOutParameter(int col,
int sqlType,
int scale)
Use this version of registerOutParameter for registering Numeric or Decimal out parameters. |
void |
registerOutParameter(int paramIndex,
int sqlType,
java.lang.String typeName)
JDBC 2.0 Registers the designated output parameter. |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType)
Registers the OUT parameter named parameterName to the JDBC type sqlType. |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType,
int scale)
Registers the parameter named parameterName to be of JDBC type sqlType. |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
Registers the designated output parameter. |
void |
setAsciiStream(java.lang.String parameterName,
java.io.InputStream x,
int 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 x)
Set a parameter to a java.sql.Numeric value. |
void |
setBinaryStream(java.lang.String parameterName,
java.io.InputStream x,
int length)
Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
void |
setBoolean(java.lang.String parameterName,
boolean x)
Sets the designated parameter to the given Java boolean value. |
void |
setByte(java.lang.String parameterName,
byte x)
Sets the designated parameter to the given Java byte value. |
void |
setBytes(java.lang.String parameterName,
byte[] x)
Set a parameter to a Java array of bytes. |
void |
setCharacterStream(java.lang.String parameterName,
java.io.Reader reader,
int length)
Sets the designated parameter to the given Reader object, which is the given number of characters long. |
void |
setDate(java.lang.String parameterName,
java.sql.Date x)
Set a parameter to a java.sql.Date value. |
void |
setDate(java.lang.String parameterName,
java.sql.Date x,
java.util.Calendar cal)
Sets the designated parameter to the given java.sql.Date value, using the given Calendar object. |
void |
setDouble(java.lang.String parameterName,
double x)
Set a parameter to a Java double value. |
void |
setFloat(java.lang.String parameterName,
float x)
Set a parameter to a Java float value. |
void |
setInt(java.lang.String parameterName,
int x)
Set a parameter to a Java int value. |
void |
setLong(java.lang.String parameterName,
long x)
Set a parameter to a Java long value. |
void |
setNull(java.lang.String parameterName,
int sqlType)
Sets the designated parameter to SQL NULL. |
void |
setNull(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
Sets the designated parameter to SQL NULL. |
void |
setObject(java.lang.String parameterName,
java.lang.Object x)
Sets the value of the designated parameter with the given object. |
void |
setObject(java.lang.String parameterName,
java.lang.Object x,
int targetSqlType)
Sets the value of the designated parameter with the given object. |
void |
setObject(java.lang.String parameterName,
java.lang.Object x,
int targetSqlType,
int scale)
Sets the value of the designated parameter with the given object. |
void |
setShort(java.lang.String parameterName,
short x)
Set a parameter to a Java short value. |
void |
setString(java.lang.String parameterName,
java.lang.String x)
Set a parameter to a Java String value. |
void |
setTime(java.lang.String parameterName,
java.sql.Time x)
Set a parameter to a java.sql.Time value. |
void |
setTime(java.lang.String parameterName,
java.sql.Time x,
java.util.Calendar cal)
Sets the designated parameter to the given java.sql.Time value, using the given Calendar object. |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp x)
Set a parameter to a java.sql.Timestamp value. |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp x,
java.util.Calendar cal)
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object. |
void |
setURL(java.lang.String parameterName,
java.net.URL val)
Sets the designated parameter to the given java.net.URL object. |
boolean |
wasNull()
An OUT parameter may have the value of SQL NULL; wasNull reports whether the last value read has this special value. |
| Methods inherited from class vortex.sql.vortexPreparedStatement |
addBatch, clearParameters, execute, executeQuery, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.PreparedStatement |
addBatch, clearParameters, execute, executeQuery, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL |
| Methods inherited from interface java.sql.Statement |
addBatch, 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, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout |
| Constructor Detail |
public vortexCallableStatement(java.sql.Connection c,
dbChannel db,
java.lang.String sql)
throws java.sql.SQLException
| Method Detail |
public void registerOutParameter(int col,
int sqlType)
throws java.sql.SQLException
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.
registerOutParameter in interface java.sql.CallableStatementsqlType - SQL type code defined by java.sql.Types;
for parameters of type Numeric or Decimal use the version of
registerOutParameter that accepts a scale value
java.sql.SQLException - thrown if column out of rangeTypes
public void registerOutParameter(int col,
int sqlType,
int scale)
throws java.sql.SQLException
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.
registerOutParameter in interface java.sql.CallableStatementsqlType - use either java.sql.Type.NUMERIC or java.sql.Type.DECIMALscale - a value greater than or equal to zero representing the
desired number of digits to the right of the decimal point
java.sql.SQLException - thrown if column out of rangeTypes
public void registerOutParameter(int paramIndex,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementsqlType - - a value from TypestypeName - - the fully-qualified name of an SQL structured type
java.sql.SQLException - - if a database-access error occurs
public boolean wasNull()
throws java.sql.SQLException
Note: You must first call getXXX on a parameter to read its value and then call wasNull() to find if the value was SQL NULL.
wasNull in interface java.sql.CallableStatementjava.sql.SQLException - Not apply
public java.lang.String getString(int col)
throws java.sql.SQLException
getString in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public boolean getBoolean(int col)
throws java.sql.SQLException
getBoolean in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public byte getByte(int col)
throws java.sql.SQLException
getByte in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public short getShort(int col)
throws java.sql.SQLException
getShort in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public int getInt(int col)
throws java.sql.SQLException
getInt in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public long getLong(int col)
throws java.sql.SQLException
getLong in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public float getFloat(int col)
throws java.sql.SQLException
getFloat in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public double getDouble(int col)
throws java.sql.SQLException
getDouble in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public java.math.BigDecimal getBigDecimal(int col,
int scale)
throws java.sql.SQLException
getBigDecimal in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public java.math.BigDecimal getBigDecimal(int col)
throws java.sql.SQLException
getBigDecimal in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public byte[] getBytes(int col)
throws java.sql.SQLException
getBytes in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public java.sql.Date getDate(int col)
throws java.sql.SQLException
getDate in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public java.sql.Date getDate(int parameterIndex,
java.util.Calendar cal)
throws java.sql.SQLException
getDate in interface java.sql.CallableStatementparameterIndex - the first parameter is 1, the second is 2, ...cal - the Calendar object the driver will use to construct the date
java.sql.SQLException - - if a database access error occurs
public java.sql.Time getTime(int col)
throws java.sql.SQLException
getTime in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public java.sql.Time getTime(int parameterIndex,
java.util.Calendar cal)
throws java.sql.SQLException
getTime in interface java.sql.CallableStatementparameterIndex - the first parameter is 1, the second is 2, ...
java.sql.SQLException - - if a database access error occurs
public java.sql.Timestamp getTimestamp(int col)
throws java.sql.SQLException
getTimestamp in interface java.sql.CallableStatementjava.sql.SQLException - thrown if column out of range
public java.sql.Timestamp getTimestamp(int parameterIndex,
java.util.Calendar cal)
throws java.sql.SQLException
getTimestamp in interface java.sql.CallableStatementparameterIndex - - the first parameter is 1, the second is 2, ...cal - the Calendar object the driver will use to construct the
timestamp
java.sql.SQLException - - if a database access error occurs
public java.lang.Object getObject(int i)
throws java.sql.SQLException
Get the value of a parameter as a Java object.
This method returns a Java object whose type coresponds to the SQL type that was registered for this parameter using registerOutParameter.
Note that this method may be used to read datatabase specific abstract data types, by specifying a targetSqlType of java.sql.types.OTHER which allows the driver to return a database specific Java type.
getObject in interface java.sql.CallableStatementi - The first parameter is 1, the second is 2, ...
java.sql.SQLException - thrown if column out of rangeTypes
public java.lang.Object getObject(int i,
java.util.Map map)
throws java.sql.SQLException
getObject in interface java.sql.CallableStatementi - the first parameter is 1, the second is 2, and so onmap - the mapping from SQL type names to Java classes
java.sql.SQLException - - if a database access error occurs
public java.sql.Blob getBlob(int i)
throws java.sql.SQLException
getBlob in interface java.sql.CallableStatementi - the first parameter is 1, the second is 2, and so on
java.sql.SQLException - - if a database access error occurs
public java.sql.Array getArray(int i)
throws java.sql.SQLException
getArray in interface java.sql.CallableStatementi - - the first parameter is 1, the second is 2, and so on
java.sql.SQLException - - if a database access error occurs
public java.sql.Clob getClob(int i)
throws java.sql.SQLException
getClob in interface java.sql.CallableStatementi - the first parameter is 1, the second is 2, and so on
java.sql.SQLException - - if a database access error occurs
public java.sql.Ref getRef(int i)
throws java.sql.SQLException
getRef in interface java.sql.CallableStatementi - - the first parameter is 1, the second is 2, ...
java.sql.SQLException - - if a database access error occurs
public int executeUpdate()
throws java.sql.SQLException
executeUpdate in interface java.sql.PreparedStatementexecuteUpdate in class vortexPreparedStatementjava.sql.SQLException - thrown if DB actions fail.
public void registerOutParameter(java.lang.String parameterName,
int sqlType)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterName - - the name of the parametersqlType - - the JDBC type code defined by java.sql.Types. If the parameter is of JDBC type NUMERIC or DECIMAL, the version of registerOutParameter that accepts a scale value should be used.
java.sql.SQLException - - if a database access error occurs
public void registerOutParameter(java.lang.String parameterName,
int sqlType,
int scale)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterName - - the name of the parametersqlType - - SQL type code defined by java.sql.Types.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 a database access error occurs
public void registerOutParameter(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
registerOutParameter in interface java.sql.CallableStatementparameterName - - the name of the parametersqlType - - a value from TypestypeName - - the fully-qualified name of an SQL structured type
java.sql.SQLException - - if a database access error occurs
public java.net.URL getURL(int parameterIndex)
throws java.sql.SQLException
getURL in interface java.sql.CallableStatementparameterIndex - - the first parameter is 1, the second is 2,...
java.sql.SQLException - - if a database access error occurs, or if the URL being returned is not a valid URL on the Java platform
public void setURL(java.lang.String parameterName,
java.net.URL val)
throws java.sql.SQLException
setURL in interface java.sql.CallableStatementparameterName - - the name of the parameterval - - the parameter value
java.sql.SQLException - - if a database access error occurs, or if a URL is malformed
public void setNull(java.lang.String parameterName,
int sqlType)
throws java.sql.SQLException
setNull in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public void setBoolean(java.lang.String parameterName,
boolean x)
throws java.sql.SQLException
setBoolean in interface java.sql.CallableStatementparameterName - - the name of the parameterx - - the parameter value
java.sql.SQLException - - if a database access error occurs
public void setByte(java.lang.String parameterName,
byte x)
throws java.sql.SQLException
setByte in interface java.sql.CallableStatementparameterName - - the name of the parameterx - - the parameter value
java.sql.SQLException - - if a database access error occurs
public void setShort(java.lang.String parameterName,
short x)
throws java.sql.SQLException
setShort in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setInt(java.lang.String parameterName,
int x)
throws java.sql.SQLException
setInt in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setLong(java.lang.String parameterName,
long x)
throws java.sql.SQLException
setLong in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setFloat(java.lang.String parameterName,
float x)
throws java.sql.SQLException
setFloat in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setDouble(java.lang.String parameterName,
double x)
throws java.sql.SQLException
setDouble in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal x)
throws java.sql.SQLException
setBigDecimal in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setString(java.lang.String parameterName,
java.lang.String x)
throws java.sql.SQLException
setString in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setBytes(java.lang.String parameterName,
byte[] x)
throws java.sql.SQLException
setBytes in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setDate(java.lang.String parameterName,
java.sql.Date x)
throws java.sql.SQLException
setDate in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setTime(java.lang.String parameterName,
java.sql.Time x)
throws java.sql.SQLException
setTime in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setTimestamp(java.lang.String parameterName,
java.sql.Timestamp x)
throws java.sql.SQLException
setTimestamp in interface java.sql.CallableStatementx - the parameter value
java.sql.SQLException - thrown if column out of range or unable to
bind parameter
public void setAsciiStream(java.lang.String parameterName,
java.io.InputStream x,
int length)
throws java.sql.SQLException
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 stream
java.sql.SQLException - - if a database access error occurs
public void setBinaryStream(java.lang.String parameterName,
java.io.InputStream x,
int length)
throws java.sql.SQLException
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 stream
java.sql.SQLException - - if a database access error occurs
public void setObject(java.lang.String parameterName,
java.lang.Object x,
int targetSqlType,
int scale)
throws java.sql.SQLException
setObject in interface java.sql.CallableStatementparameterName - - the name of the parameterx - - the object containing the input parameter valuetargetSqlType - - the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.scale - - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
- - if a database access error occurs
java.sql.SQLException
public void setObject(java.lang.String parameterName,
java.lang.Object x,
int targetSqlType)
throws java.sql.SQLException
setObject in interface java.sql.CallableStatementparameterName - - the name of the parameterx - - the object containing the input parameter valuetargetSqlType - - the SQL type (as defined in java.sql.Types) to be sent to the database
java.sql.SQLException - - if a database access error occurs
public void setObject(java.lang.String parameterName,
java.lang.Object x)
throws java.sql.SQLException
setObject in interface java.sql.CallableStatementparameterName - - the name of the parameterx - - the object containing the input parameter value
java.sql.SQLException - - if a database access error occurs or if the given Object parameter is ambiguous
public void setCharacterStream(java.lang.String parameterName,
java.io.Reader reader,
int length)
throws java.sql.SQLException
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 stream
java.sql.SQLException - - if a database access error occurs
public void setDate(java.lang.String parameterName,
java.sql.Date x,
java.util.Calendar cal)
throws java.sql.SQLException
setDate in interface java.sql.CallableStatementparameterName - - the name of the parameterx - - the parameter valuecal - - the Calendar object the driver will use to construct the date
java.sql.SQLException - - if a database access error occurs
public void setTime(java.lang.String parameterName,
java.sql.Time x,
java.util.Calendar cal)
throws java.sql.SQLException
setTime in interface java.sql.CallableStatementparameterName - - the name of the parameterx - - the parameter valuecal - - the Calendar object the driver will use to construct the time
java.sql.SQLException
public void setTimestamp(java.lang.String parameterName,
java.sql.Timestamp x,
java.util.Calendar cal)
throws java.sql.SQLException
setTimestamp in interface java.sql.CallableStatementx - - the parameter valuecal - - the Calendar object the driver will use to construct the timestamp
java.sql.SQLException - - if a database access error occurs
public void setNull(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
setNull in interface java.sql.CallableStatementparameterName - - the name of the parametersqlType - - a value from java.sql.TypestypeName - - the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or SQL REF value
java.sql.SQLException - - if a database access error occurs
public java.lang.String getString(java.lang.String parameterName)
throws java.sql.SQLException
getString in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public boolean getBoolean(java.lang.String parameterName)
throws java.sql.SQLException
getBoolean in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public byte getByte(java.lang.String parameterName)
throws java.sql.SQLException
getByte in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public short getShort(java.lang.String parameterName)
throws java.sql.SQLException
getShort in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public int getInt(java.lang.String parameterName)
throws java.sql.SQLException
getInt in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public long getLong(java.lang.String parameterName)
throws java.sql.SQLException
getLong in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public float getFloat(java.lang.String parameterName)
throws java.sql.SQLException
getFloat in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public double getDouble(java.lang.String parameterName)
throws java.sql.SQLException
getDouble in interface java.sql.CallableStatementjava.sql.SQLException - - if a database access error occurs
public byte[] getBytes(java.lang.String parameterName)
throws java.sql.SQLException
getBytes in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public java.sql.Date getDate(java.lang.String parameterName)
throws java.sql.SQLException
getDate in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public java.sql.Time getTime(java.lang.String parameterName)
throws java.sql.SQLException
getTime in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException
public java.sql.Timestamp getTimestamp(java.lang.String parameterName)
throws java.sql.SQLException
getTimestamp in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public java.lang.Object getObject(java.lang.String parameterName)
throws java.sql.SQLException
getObject in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException
public java.math.BigDecimal getBigDecimal(java.lang.String parameterName)
throws java.sql.SQLException
getBigDecimal in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public java.lang.Object getObject(java.lang.String parameterName,
java.util.Map map)
throws java.sql.SQLException
getObject in interface java.sql.CallableStatementparameterName - - the name of the parametermap - - the mapping from SQL type names to Java classes
java.sql.SQLException - - if a database access error occurs
public java.sql.Ref getRef(java.lang.String parameterName)
throws java.sql.SQLException
getRef in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public java.sql.Blob getBlob(java.lang.String parameterName)
throws java.sql.SQLException
getBlob in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public java.sql.Clob getClob(java.lang.String parameterName)
throws java.sql.SQLException
getClob in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public java.sql.Array getArray(java.lang.String parameterName)
throws java.sql.SQLException
getArray in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs
public java.sql.Date getDate(java.lang.String parameterName,
java.util.Calendar cal)
throws java.sql.SQLException
getDate in interface java.sql.CallableStatementparameterName - - the name of the parametercal - - the Calendar object the driver will use to construct the date
java.sql.SQLException - - if a database access error occurs
public java.sql.Time getTime(java.lang.String parameterName,
java.util.Calendar cal)
throws java.sql.SQLException
getTime in interface java.sql.CallableStatementparameterName - - the name of the parametercal - - the Calendar object the driver will use to construct the time
java.sql.SQLException - - if a database access error occurs
public java.sql.Timestamp getTimestamp(java.lang.String parameterName,
java.util.Calendar cal)
throws java.sql.SQLException
getTimestamp in interface java.sql.CallableStatementparameterName - - the name of the parametercal - - the Calendar object the driver will use to construct the timestamp
java.sql.SQLException - - if a database access error occurs
public java.net.URL getURL(java.lang.String parameterName)
throws java.sql.SQLException
getURL in interface java.sql.CallableStatementparameterName - - the name of the parameter
java.sql.SQLException - - if a database access error occurs, or if there is a problem with the URL
| |||