Package org.apache.derby.impl.jdbc
Class EmbedCallableStatement
java.lang.Object
org.apache.derby.impl.jdbc.ConnectionChild
org.apache.derby.impl.jdbc.EmbedStatement
org.apache.derby.impl.jdbc.EmbedPreparedStatement
org.apache.derby.impl.jdbc.EmbedCallableStatement
- All Implemented Interfaces:
AutoCloseable
,CallableStatement
,PreparedStatement
,Statement
,Wrapper
,EngineCallableStatement
,EnginePreparedStatement
,EngineStatement
- Direct Known Subclasses:
EmbedCallableStatement42
public class EmbedCallableStatement
extends EmbedPreparedStatement
implements EngineCallableStatement
Local implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
protected boolean
Fields inherited from class org.apache.derby.impl.jdbc.EmbedPreparedStatement
preparedStatement, rMetaData
Fields inherited from class org.apache.derby.impl.jdbc.EmbedStatement
applicationStatement, batchStatements, isPoolable, lcc, MaxFieldSize, maxRows, results, resultSetConcurrency, resultSetType, SQLText, timeoutMillis, updateCount
Fields inherited from class org.apache.derby.impl.jdbc.ConnectionChild
factory, localConn
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
ConstructorsConstructorDescriptionEmbedCallableStatement
(EmbedConnection conn, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBatch()
JDBC 2.0 Add a set of parameters to the batch.protected void
checkRequiresCallableStatement
(Activation activation) Check to see if a statement requires to be executed via a callable statement.protected final boolean
executeStatement
(Activation a, boolean executeQuery, boolean executeUpdate) Execute the current statement.final Array
getArray
(int i) JDBC 2.0 Get an Array OUT parameter.final Array
JDBC 3.0 Retrieves the value of a JDBC ARRAY parameter as an Array object in the Java programming language.final BigDecimal
getBigDecimal
(int parameterIndex) JDBC 2.0 Get the value of a NUMERIC parameter as a java.math.BigDecimal object.final BigDecimal
getBigDecimal
(int parameterIndex, int scale) Deprecated.final BigDecimal
getBigDecimal
(String parameterName) JDBC 3.0 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 containsprivate InputStream
getBinaryStream
(int parameterIndex) Get binary stream for a parameter.getBlob
(int parameterIndex) JDBC 2.0 Get a BLOB OUT parameter.final Blob
JDBC 3.0 Retrieves the value of a JDBC BLOB parameter as a Blob object in the Java programming language.boolean
getBoolean
(int parameterIndex) final boolean
getBoolean
(String parameterName) JDBC 3.0 Retrieves the value of a JDBC BIT parameter as a boolean in the Java programming language.byte
getByte
(int parameterIndex) final byte
JDBC 3.0 Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language.byte[]
getBytes
(int parameterIndex) final byte[]
JDBC 3.0 Retrieves the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.final Reader
getCharacterStream
(int parameterIndex) Retrieves the value of the designated parameter as ajava.io.Reader
object in the Java programming language.final Reader
getCharacterStream
(String parameterName) getClob
(int parameterIndex) JDBC 2.0 Get a CLOB OUT parameter.final Clob
JDBC 3.0 Retrieves the value of a JDBC CLOB parameter as a Clob object in the Java programming language.getDate
(int parameterIndex) Get the value of a SQL DATE parameter as a java.sql.Date objectfinal Date
JDBC 3.0 Retrieves the value of a JDBC DATE parameter as a java.sql.Date objectfinal Date
JDBC 3.0 Retrieves the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date object.double
getDouble
(int parameterIndex) final double
JDBC 3.0 Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language.float
getFloat
(int parameterIndex) final float
JDBC 3.0 Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language.int
getInt
(int parameterIndex) final int
JDBC 3.0 Retrieves the value of a JDBC INTEGER parameter as a int in the Java programming language.long
getLong
(int parameterIndex) final long
JDBC 3.0 Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language.final Reader
getNCharacterStream
(int parameterIndex) final Reader
getNCharacterStream
(String parameterName) final NClob
getNClob
(int i) final NClob
final String
getNString
(int parameterIndex) final String
getNString
(String parameterName) final Object
getObject
(int parameterIndex) final <T> T
final Object
JDBC 2.0 Returns an object representing the value of OUT parameteri
.final Object
JDBC 3.0 Retrieves the value of a parameter as an Object in the java programming language.final <T> T
final Object
JDBC 3.0 Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.final Ref
getRef
(int i) JDBC 2.0 Get a REF(<structured-type>) OUT parameter.final Ref
JDBC 3.0 Retrieves the value of a JDBC REF (structured-type) parameter as a Ref object in the Java programming language.final RowId
getRowId
(int parameterIndex) final RowId
short
getShort
(int parameterIndex) final short
JDBC 3.0 Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language.final SQLXML
getSQLXML
(int parameterIndex) final SQLXML
getString
(int parameterIndex) final String
JDBC 3.0 Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.getTime
(int parameterIndex) Get the value of a SQL TIME parameter as a java.sql.Time object.final Time
JDBC 3.0 Retrieves the value of a JDBC TIME parameter as ajava.sql.Time objectfinal Time
JDBC 3.0 Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time object.getTimestamp
(int parameterIndex) Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.getTimestamp
(int parameterIndex, Calendar cal) final Timestamp
getTimestamp
(String parameterName) JDBC 3.0 Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp objectfinal Timestamp
getTimestamp
(String parameterName, Calendar cal) JDBC 3.0 Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.getURL
(int parameterIndex) JDBC 3.0 Retrieve the value of the designated JDBC DATALINK parameter as a java.net.URL objectJDBC 3.0 Retrieves the value of a JDBC DATALINK parameter as a java.net.URL objectprivate SQLException
mismatchException
(String targetTypeName, int parameterIndex) final void
registerOutParameter
(int parameterIndex, int sqlType) final void
registerOutParameter
(int parameterIndex, int sqlType, int scale) void
registerOutParameter
(int parameterIndex, int sqlType, String typeName) JDBC 2.0 Derby ignores the typeName argument because UDTs don't need it.final void
registerOutParameter
(String parameterName, int sqlType) JDBC 3.0 Registers the OUT parameter named parameterName to the JDBC type sqlType.final void
registerOutParameter
(String parameterName, int sqlType, int scale) JDBC 3.0 Registers the parameter named parameterName to the JDBC type sqlType.final void
registerOutParameter
(String parameterName, int sqlType, String typeName) JDBC 3.0 Registers the designated output parameter.final void
setAsciiStream
(String parameterName, InputStream x) final void
setAsciiStream
(String parameterName, InputStream x, int length) JDBC 3.0 Sets the designated parameter to the given input stream, which will have the specified number of bytes.final void
setAsciiStream
(String parameterName, InputStream x, long length) Sets the designated parameter to the given input stream, which will have the specified number of bytes.final void
setBigDecimal
(String parameterName, BigDecimal x) JDBC 3.0 Sets the designated parameter to the given java.math.BigDecimal value.final void
setBinaryStream
(String parameterName, InputStream x) final void
setBinaryStream
(String parameterName, InputStream x, int length) JDBC 3.0 Sets the designated parameter to the given input stream, which will have the specified number of bytes.final void
setBinaryStream
(String parameterName, InputStream x, long length) Sets the designated parameter to the given input stream, which will have the specified number of bytes.final void
setBlob
(String parameterName, InputStream inputStream) final void
setBlob
(String parameterName, InputStream inputStream, long length) final void
final void
setBoolean
(String parameterName, boolean x) JDBC 3.0 Sets the designated parameter to the given Java boolean value.final void
JDBC 3.0 Sets the designated parameter to the given Java byte value.final void
JDBC 3.0 Sets the designated parameter to the given Java array of bytes.final void
setCharacterStream
(String parameterName, Reader reader) final void
setCharacterStream
(String parameterName, Reader reader, int length) JDBC 3.0 Sets the designated parameter to the given Reader object, which is the given number of characters long.final void
setCharacterStream
(String parameterName, Reader x, long length) Sets the designated parameter to the given Reader, which will have the specified number of bytes.final void
final void
final void
final void
JDBC 3.0 Sets the designated parameter to the given java.sql.Date value.final void
JDBC 3.0 Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.final void
JDBC 3.0 Sets the designated parameter to the given Java double value.final void
JDBC 3.0 Sets the designated parameter to the given Java float value.final void
JDBC 3.0 Sets the designated parameter to the given Java int value.final void
JDBC 3.0 Sets the designated parameter to the given Java long value.final void
setNCharacterStream
(String parameterName, Reader value) final void
setNCharacterStream
(String parameterName, Reader value, long length) final void
final void
final void
final void
setNString
(String parameterName, String value) final void
JDBC 3.0 Sets the designated parameter to SQL NULL.final void
JDBC 3.0 Sets the designated parameter to SQL NULL.final void
JDBC 3.0 Sets the value of the designated parameter with the given object.final void
JDBC 3.0 Sets the value of the designated parameter with the given object.final void
JDBC 3.0 Sets the value of the designated parameter with the given object.final void
final void
JDBC 3.0 Sets the designated parameter to the given Java short value.final void
final void
JDBC 3.0 Sets the designated parameter to the given Java String value.final void
JDBC 3.0 Sets the designated parameter to the given java.sql.Time value.final void
JDBC 3.0 Sets the designated parameter to the given java.sql.Time value using the Calendar objectfinal void
setTimestamp
(String parameterName, Timestamp x) JDBC 3.0 Sets the designated parameter to the given java.sql.Timestamp value.final void
setTimestamp
(String parameterName, Timestamp x, Calendar cal) JDBC 3.0 Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar objectvoid
JDBC 3.0 Sets the designated parameter to the given java.net.URL object.boolean
wasNull()
Methods inherited from class org.apache.derby.impl.jdbc.EmbedPreparedStatement
addBatch, clearParameters, closeActions, dataTypeConversion, execute, execute, execute, execute, execute, executeBatchElement, executeLargeUpdate, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finalize, getMetaData, getParameterJDBCType, getParameterMetaData, getParameterSQLType, getParms, getVersionCounter, newEmbedResultSetMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setBrokeredConnectionControl, 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, setURL, toString, transferParameters
Methods inherited from class org.apache.derby.impl.jdbc.EmbedStatement
addWarning, cancel, checkExecStatus, checkIfInMiddleOfBatch, checkStatus, clearBatch, clearResultSets, clearWarnings, close, closeMeOnCompletion, closeOnCompletion, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getParameterValueSet, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getSQLText, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, processDynamicResult, resultSetClosing, setApplicationStatement, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, transferBatch, unwrap
Methods inherited from class org.apache.derby.impl.jdbc.ConnectionChild
commitIfAutoCommit, commitIfNeeded, getCal, getConnectionSynchronization, getEmbedConnection, getLanguageConnectionContext, getLCC, handleException, needCommit, newSQLException, restoreContextStack, restoreIntrFlagIfSeen, setupContextStack
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.sql.CallableStatement
registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setObject, setObject
Methods inherited from interface org.apache.derby.iapi.jdbc.EngineStatement
closeOnCompletion, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isCloseOnCompletion, setLargeMaxRows
Methods inherited from interface java.sql.PreparedStatement
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, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, 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, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
hasReturnOutputParameter
private boolean hasReturnOutputParameter -
wasNull
protected boolean wasNull
-
-
Constructor Details
-
EmbedCallableStatement
public EmbedCallableStatement(EmbedConnection conn, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Throws:
SQLException
- thrown on failure
-
-
Method Details
-
checkRequiresCallableStatement
Description copied from class:EmbedStatement
Check to see if a statement requires to be executed via a callable statement.- Overrides:
checkRequiresCallableStatement
in classEmbedStatement
-
executeStatement
protected final boolean executeStatement(Activation a, boolean executeQuery, boolean executeUpdate) throws SQLException Description copied from class:EmbedStatement
Execute the current statement.- Overrides:
executeStatement
in classEmbedPreparedStatement
- Throws:
SQLException
- thrown on failure.
-
registerOutParameter
- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
registerOutParameter
public final void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException - Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException JDBC 2.0 Derby ignores the typeName argument because UDTs don't need it.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Throws:
SQLException
- if a database-access error occurs.
-
wasNull
- Specified by:
wasNull
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getString
- Specified by:
getString
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getBoolean
- Specified by:
getBoolean
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getByte
- Specified by:
getByte
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getShort
- Specified by:
getShort
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getInt
- Specified by:
getInt
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getLong
- Specified by:
getLong
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getBigDecimal
JDBC 2.0 Get the value of a NUMERIC parameter as a java.math.BigDecimal object.- Specified by:
getBigDecimal
in interfaceCallableStatement
- Parameters:
parameterIndex
- the first parameter is 1, the second is 2, ...- Returns:
- the parameter value (full precision); if the value is SQL NULL, the result is null
- Throws:
SQLException
- if a database-access error occurs.
-
getBigDecimal
Deprecated.- Specified by:
getBigDecimal
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getFloat
- Specified by:
getFloat
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getDouble
- Specified by:
getDouble
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getBytes
- Specified by:
getBytes
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getDate
- Specified by:
getDate
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getTime
- Specified by:
getTime
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getTimestamp
- Specified by:
getTimestamp
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getDate
Get the value of a SQL DATE parameter as a java.sql.Date object- Specified by:
getDate
in interfaceCallableStatement
- Parameters:
parameterIndex
- the first parameter is 1, the second is 2, ...- Returns:
- the parameter value; if the value is SQL NULL, the result is null
- Throws:
SQLException
- if a database-access error occurs.
-
getTime
Get the value of a SQL TIME parameter as a java.sql.Time object.- Specified by:
getTime
in interfaceCallableStatement
- Parameters:
parameterIndex
- the first parameter is 1, the second is 2, ...- Returns:
- the parameter value; if the value is SQL NULL, the result is null
- Throws:
SQLException
- if a database-access error occurs.
-
getTimestamp
Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.- Specified by:
getTimestamp
in interfaceCallableStatement
- Parameters:
parameterIndex
- the first parameter is 1, the second is 2, ...- Returns:
- the parameter value; if the value is SQL NULL, the result is null
- Throws:
SQLException
- if a database-access error occurs.
-
getObject
- Specified by:
getObject
in interfaceCallableStatement
- Throws:
SQLException
- NoOutputParameters thrown.- See Also:
-
getURL
JDBC 3.0 Retrieve the value of the designated JDBC DATALINK parameter as a java.net.URL object- Specified by:
getURL
in interfaceCallableStatement
- Parameters:
parameterIndex
- - the first parameter is 1, the second is 2- Returns:
- a java.net.URL object that represents the JDBC DATALINK value used as the designated parameter
- Throws:
SQLException
- Feature not implemented for now.
-
setURL
JDBC 3.0 Sets the designated parameter to the given java.net.URL object. The driver converts this to an SQL DATALINK value when it sends it to the database.- Specified by:
setURL
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterval
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getURL
JDBC 3.0 Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object- Specified by:
getURL
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
getBlob
JDBC 2.0 Get a BLOB OUT parameter.- Specified by:
getBlob
in interfaceCallableStatement
- Parameters:
parameterIndex
- the first parameter is 1, the second is 2, ...- Returns:
- an object representing a BLOB
- Throws:
SQLException
- if a database-access error occurs.
-
getClob
JDBC 2.0 Get a CLOB OUT parameter.- Specified by:
getClob
in interfaceCallableStatement
- Parameters:
parameterIndex
- the first parameter is 1, the second is 2, ...- Returns:
- an object representing a CLOB
- Throws:
SQLException
- if a database-access error occurs.
-
addBatch
Description copied from class:EmbedPreparedStatement
JDBC 2.0 Add a set of parameters to the batch.- Specified by:
addBatch
in interfacePreparedStatement
- Overrides:
addBatch
in classEmbedPreparedStatement
- Throws:
SQLException
- if a database-access error occurs.
-
getObject
JDBC 2.0 Returns an object representing the value of OUT parameteri
. Use the map to determine the class from which to construct data of SQL structured and distinct types.- Specified by:
getObject
in interfaceCallableStatement
- Parameters:
i
- the first parameter is 1, the second is 2, ...map
- the mapping from SQL type names to Java classes- Returns:
- a java.lang.Object holding the OUT parameter value.
- Throws:
SQLException
- if a database-access error occurs.
-
getRef
JDBC 2.0 Get a REF(<structured-type>) OUT parameter.- Specified by:
getRef
in interfaceCallableStatement
- Parameters:
i
- the first parameter is 1, the second is 2, ...- Returns:
- an object representing data of an SQL REF Type
- Throws:
SQLException
- if a database-access error occurs.
-
getArray
JDBC 2.0 Get an Array OUT parameter.- Specified by:
getArray
in interfaceCallableStatement
- Parameters:
i
- the first parameter is 1, the second is 2, ...- Returns:
- an object representing an SQL array
- Throws:
SQLException
- if a database-access error occurs.
-
registerOutParameter
JDBC 3.0 Registers the OUT parameter named parameterName to the JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Parameters:
parameterName
- - 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.- Throws:
SQLException
- Feature not implemented for now.
-
registerOutParameter
public final void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException JDBC 3.0 Registers the designated output parameter. This version of the method registerOutParameter should be used for a user-named or REF output parameter.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parametersqlType
- - the SQL type code defined by java.sql.Types.typeName
- - the fully-qualified name of an SQL structure type- Throws:
SQLException
- Feature not implemented for now.
-
registerOutParameter
public final void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException JDBC 3.0 Registers the parameter named parameterName to the JDBC type sqlType. This method must be called before a stored procedure is executed.- Specified by:
registerOutParameter
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parametersqlType
- - the 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.- Throws:
SQLException
- Feature not implemented for now.
-
getRef
JDBC 3.0 Retrieves the value of a JDBC REF (structured-type) parameter as a Ref object in the Java programming language.- Specified by:
getRef
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value as a Ref object in the Java Programming language. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
getBlob
JDBC 3.0 Retrieves the value of a JDBC BLOB parameter as a Blob object in the Java programming language.- Specified by:
getBlob
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value as a Blob object in the Java Programming language. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
getClob
JDBC 3.0 Retrieves the value of a JDBC CLOB parameter as a Clob object in the Java programming language.- Specified by:
getClob
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value as a Clob object in the Java Programming language. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
getArray
JDBC 3.0 Retrieves the value of a JDBC ARRAY parameter as an Array object in the Java programming language.- Specified by:
getArray
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value as a Array object in the Java Programming language. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
setNull
JDBC 3.0 Sets the designated parameter to SQL NULL.- Specified by:
setNull
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parametersqlType
- - the SQL type code defined in java.sql.Types- Throws:
SQLException
- Feature not implemented for now.
-
setNull
JDBC 3.0 Sets the designated parameter to SQL NULL.- Specified by:
setNull
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parametersqlType
- - the SQL type code defined in java.sql.TypestypeName
- - the fully-qualified name of an SQL user-defined type- Throws:
SQLException
- Feature not implemented for now.
-
setBoolean
JDBC 3.0 Sets the designated parameter to the given Java boolean value. The driver converts this to an SQL BIT value when it sends it to the database.- Specified by:
setBoolean
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getBoolean
JDBC 3.0 Retrieves the value of a JDBC BIT parameter as a boolean in the Java programming language.- Specified by:
getBoolean
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is false.
- Throws:
SQLException
- Feature not implemented for now.
-
setByte
JDBC 3.0 Sets the designated parameter to the given Java byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.- Specified by:
setByte
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getByte
JDBC 3.0 Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language.- Specified by:
getByte
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is 0.
- Throws:
SQLException
- Feature not implemented for now.
-
setShort
JDBC 3.0 Sets the designated parameter to the given Java short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.- Specified by:
setShort
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getShort
JDBC 3.0 Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language.- Specified by:
getShort
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is 0.
- Throws:
SQLException
- Feature not implemented for now.
-
setInt
JDBC 3.0 Sets the designated parameter to the given Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database.- Specified by:
setInt
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getInt
JDBC 3.0 Retrieves the value of a JDBC INTEGER parameter as a int in the Java programming language.- Specified by:
getInt
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is 0.
- Throws:
SQLException
- Feature not implemented for now.
-
setLong
JDBC 3.0 Sets the designated parameter to the given Java long value. The driver converts this to an SQL BIGINT value when it sends it to the database.- Specified by:
setLong
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getLong
JDBC 3.0 Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language.- Specified by:
getLong
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is 0.
- Throws:
SQLException
- Feature not implemented for now.
-
setFloat
JDBC 3.0 Sets the designated parameter to the given Java float value. The driver converts this to an SQL FLOAT value when it sends it to the database.- Specified by:
setFloat
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getFloat
JDBC 3.0 Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language.- Specified by:
getFloat
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is 0.
- Throws:
SQLException
- Feature not implemented for now.
-
setDouble
JDBC 3.0 Sets the designated parameter to the given Java double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.- Specified by:
setDouble
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getDouble
JDBC 3.0 Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language.- Specified by:
getDouble
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is 0.
- Throws:
SQLException
- Feature not implemented for now.
-
setBigDecimal
JDBC 3.0 Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.- Specified by:
setBigDecimal
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getBigDecimal
JDBC 3.0 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- Specified by:
getBigDecimal
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is 0.
- Throws:
SQLException
- Feature not implemented for now.
-
setString
JDBC 3.0 Sets the designated parameter to the given Java String value. The driver converts this to an SQL VARCHAR OR LONGVARCHAR value (depending on the argument's size relative the driver's limits on VARCHAR values) when it sends it to the database.- Specified by:
setString
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getString
JDBC 3.0 Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.- Specified by:
getString
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
setBytes
JDBC 3.0 Sets the designated parameter to the given Java array of bytes. The driver converts this to an SQL VARBINARY OR LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values)when it sends it to the database.- Specified by:
setBytes
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getBytes
JDBC 3.0 Retrieves the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.- Specified by:
getBytes
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
setDate
JDBC 3.0 Sets the designated parameter to the given java.sql.Date value. The driver converts this to an SQL DATE value when it sends it to the database.- Specified by:
setDate
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
setDate
JDBC 3.0 Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.- Specified by:
setDate
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter valuecal
- - the Calendar object the driver will use to construct the date- Throws:
SQLException
- Feature not implemented for now.
-
getDate
JDBC 3.0 Retrieves the value of a JDBC DATE parameter as a java.sql.Date object- Specified by:
getDate
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
getDate
JDBC 3.0 Retrieves the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date object.- Specified by:
getDate
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parametercal
- - the Calendar object the driver will use to construct the date- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
setTime
JDBC 3.0 Sets the designated parameter to the given java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.- Specified by:
setTime
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getTime
JDBC 3.0 Retrieves the value of a JDBC TIME parameter as ajava.sql.Time object- Specified by:
getTime
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
getTime
JDBC 3.0 Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time object.- Specified by:
getTime
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parametercal
- - the Calendar object the driver will use to construct the time- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
setTime
JDBC 3.0 Sets the designated parameter to the given java.sql.Time value using the Calendar object- Specified by:
setTime
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter valuecal
- - the Calendar object the driver will use to construct the time- Throws:
SQLException
- Feature not implemented for now.
-
setTimestamp
JDBC 3.0 Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.- Specified by:
setTimestamp
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter value- Throws:
SQLException
- Feature not implemented for now.
-
setTimestamp
JDBC 3.0 Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object- Specified by:
setTimestamp
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the parameter valuecal
- - the Calendar object the driver will use to construct the timestamp.- Throws:
SQLException
- Feature not implemented for now.
-
getTimestamp
JDBC 3.0 Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object- Specified by:
getTimestamp
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
getTimestamp
JDBC 3.0 Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.- Specified by:
getTimestamp
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parametercal
- - the Calendar object the driver will use to construct the Timestamp- Returns:
- the parameter value. If the value is SQL NULL, the result is null.
- Throws:
SQLException
- Feature not implemented for now.
-
setAsciiStream
public final void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException JDBC 3.0 Sets the designated parameter to the given input stream, which will have the specified number of bytes.- Specified by:
setAsciiStream
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the Java input stream that contains the ASCII parameter valuelength
- - the number of bytes in the stream- Throws:
SQLException
- Feature not implemented for now.
-
setBinaryStream
public final void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException JDBC 3.0 Sets the designated parameter to the given input stream, which will have the specified number of bytes.- Specified by:
setBinaryStream
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the Java input stream that contains the binary parameter valuelength
- - the number of bytes in the stream- Throws:
SQLException
- Feature not implemented for now.
-
setCharacterStream
public final void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException JDBC 3.0 Sets the designated parameter to the given Reader object, which is the given number of characters long.- Specified by:
setCharacterStream
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterreader
- - the java.io.Reader object that contains the UNICODE datalength
- - the number of characters in the stream- Throws:
SQLException
- Feature not implemented for now.
-
setObject
public final void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException JDBC 3.0 Sets the value of the designated parameter with the given object. The second argument must be an object type; for integral values, the java.lang equivalent objects should be used.- Specified by:
setObject
in interfaceCallableStatement
- Parameters:
parameterName
- - 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.- Throws:
SQLException
- Feature not implemented for now.
-
getObject
JDBC 3.0 Retrieves the value of a parameter as an Object in the java programming language.- Specified by:
getObject
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameter- Returns:
- a java.lang.Object holding the OUT parameter value
- Throws:
SQLException
- Feature not implemented for now.
-
getObject
JDBC 3.0 Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.- Specified by:
getObject
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parametermap
- - the mapping from SQL type names to Java classes- Returns:
- a java.lang.Object holding the OUT parameter value
- Throws:
SQLException
- Feature not implemented for now.
-
setObject
JDBC 3.0 Sets the value of the designated parameter with the given object. This method is like the method setObject above, except that it assumes a scale of zero.- Specified by:
setObject
in interfaceCallableStatement
- Parameters:
parameterName
- - 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.- Throws:
SQLException
- Feature not implemented for now.
-
setObject
JDBC 3.0 Sets the value of the designated parameter with the given object. The second parameter must be of type Object; therefore, the java.lang equivalent objects should be used for built-in types.- Specified by:
setObject
in interfaceCallableStatement
- Parameters:
parameterName
- - the name of the parameterx
- - the object containing the input parameter value- Throws:
SQLException
- Feature not implemented for now.
-
getCharacterStream
Retrieves the value of the designated parameter as ajava.io.Reader
object in the Java programming language. Introduced in JDBC 4.0.- Specified by:
getCharacterStream
in interfaceCallableStatement
- Parameters:
parameterIndex
- the first parameter is 1, the second is 2, ...- Returns:
- a
java.io.Reader
object that contains the parameter value; if the value is SQLNULL
, the value returned isnull
in the Java programming language. - Throws:
SQLException
- if a database access error occurs or this method is called on a closedCallableStatement
-
getBinaryStream
Get binary stream for a parameter.- Parameters:
parameterIndex
- first parameter is 1, second is 2 etc.- Returns:
- a stream for the binary parameter, or
null
. - Throws:
SQLException
- if a database access error occurs.
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
getNCharacterStream
- Specified by:
getNCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
getNCharacterStream
- Specified by:
getNCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
getNString
- Specified by:
getNString
in interfaceCallableStatement
- Throws:
SQLException
-
getNString
- Specified by:
getNString
in interfaceCallableStatement
- Throws:
SQLException
-
setBlob
- Specified by:
setBlob
in interfaceCallableStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfaceCallableStatement
- Throws:
SQLException
-
getRowId
- Specified by:
getRowId
in interfaceCallableStatement
- Throws:
SQLException
-
getRowId
- Specified by:
getRowId
in interfaceCallableStatement
- Throws:
SQLException
-
setRowId
- Specified by:
setRowId
in interfaceCallableStatement
- Throws:
SQLException
-
setNString
- Specified by:
setNString
in interfaceCallableStatement
- Throws:
SQLException
-
setNCharacterStream
public final void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException - Specified by:
setNCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
setNClob
- Specified by:
setNClob
in interfaceCallableStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfaceCallableStatement
- Throws:
SQLException
-
setBlob
public final void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException - Specified by:
setBlob
in interfaceCallableStatement
- Throws:
SQLException
-
setNClob
- Specified by:
setNClob
in interfaceCallableStatement
- Throws:
SQLException
-
getNClob
- Specified by:
getNClob
in interfaceCallableStatement
- Throws:
SQLException
-
getNClob
- Specified by:
getNClob
in interfaceCallableStatement
- Throws:
SQLException
-
setSQLXML
- Specified by:
setSQLXML
in interfaceCallableStatement
- Throws:
SQLException
-
getSQLXML
- Specified by:
getSQLXML
in interfaceCallableStatement
- Throws:
SQLException
-
getSQLXML
- Specified by:
getSQLXML
in interfaceCallableStatement
- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStream
in interfaceCallableStatement
- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStream
in interfaceCallableStatement
- Throws:
SQLException
-
setBlob
- Specified by:
setBlob
in interfaceCallableStatement
- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
setClob
- Specified by:
setClob
in interfaceCallableStatement
- Throws:
SQLException
-
setNCharacterStream
- Specified by:
setNCharacterStream
in interfaceCallableStatement
- Throws:
SQLException
-
setNClob
- Specified by:
setNClob
in interfaceCallableStatement
- Throws:
SQLException
-
setAsciiStream
public final void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException Sets the designated parameter to the given input stream, which will have the specified number of bytes.- Specified by:
setAsciiStream
in interfaceCallableStatement
- Parameters:
parameterName
- the name of the first parameterx
- the java input stream which contains the ASCII parameter valuelength
- the number of bytes in the stream- Throws:
SQLException
- thrown on failure.
-
setBinaryStream
public final void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException Sets the designated parameter to the given input stream, which will have the specified number of bytes.- Specified by:
setBinaryStream
in interfaceCallableStatement
- Parameters:
parameterName
- the name of the first parameterx
- the java input stream which contains the binary parameter valuelength
- the number of bytes in the stream- Throws:
SQLException
- thrown on failure.
-
setCharacterStream
public final void setCharacterStream(String parameterName, Reader x, long length) throws SQLException Sets the designated parameter to the given Reader, which will have the specified number of bytes.- Specified by:
setCharacterStream
in interfaceCallableStatement
- Parameters:
parameterName
- the name of the first parameterx
- the java Reader which contains the UNICODE valuelength
- the number of bytes in the stream- Throws:
SQLException
- thrown on failure.
-
getObject
- Specified by:
getObject
in interfaceCallableStatement
- Specified by:
getObject
in interfaceEngineCallableStatement
- Throws:
SQLException
-
mismatchException
private SQLException mismatchException(String targetTypeName, int parameterIndex) throws SQLException - Throws:
SQLException
-
getObject
- Specified by:
getObject
in interfaceCallableStatement
- Specified by:
getObject
in interfaceEngineCallableStatement
- Throws:
SQLException
-