Class JdbcCallableStatement
- All Implemented Interfaces:
AutoCloseable,CallableStatement,PreparedStatement,Statement,Wrapper
Thread safety: the callable statement is not thread-safe. If the same callable statement is used by multiple threads access to it must be synchronized. The single synchronized block must include assignment of parameters, execution of the command and all operations with its result.
synchronized (call) {
call.setInt(1, 10);
try (ResultSet rs = call.executeQuery()) {
while (rs.next) {
// Do something
}
}
}
synchronized (call) {
call.setInt(1, 15);
updateCount = call.executeUpdate();
}
-
Field Summary
Fields inherited from class org.h2.jdbc.JdbcPreparedStatement
commandFields inherited from class org.h2.jdbc.JdbcStatement
conn, fetchSize, generatedKeys, maxRows, resultSet, resultSetConcurrency, resultSetType, session, updateCountFields inherited from class org.h2.message.TraceObject
ARRAY, BLOB, CALLABLE_STATEMENT, CLOB, CONNECTION, DATA_SOURCE, DATABASE_META_DATA, PARAMETER_META_DATA, PREPARED_STATEMENT, RESULT_SET, RESULT_SET_META_DATA, SAVEPOINT, SQLXML, STATEMENT, trace, XA_DATA_SOURCE, XIDFields 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 -
Method Summary
Modifier and TypeMethodDescriptionlongExecutes a statement (insert, update, delete, create, drop) and returns the update count.intExecutes a statement (insert, update, delete, create, drop) and returns the update count.getArray(int parameterIndex) Returns the value of the specified column as an Array.Returns the value of the specified column as an Array.getBigDecimal(int parameterIndex) Returns the value of the specified column as a BigDecimal.getBigDecimal(int parameterIndex, int scale) Deprecated.getBigDecimal(String parameterName) Returns the value of the specified column as a BigDecimal.getBlob(int parameterIndex) Returns the value of the specified column as a Blob.Returns the value of the specified column as a Blob.booleangetBoolean(int parameterIndex) Returns the value of the specified column as a boolean.booleangetBoolean(String parameterName) Returns the value of the specified column as a boolean.bytegetByte(int parameterIndex) Returns the value of the specified column as a byte.byteReturns the value of the specified column as a byte.byte[]getBytes(int parameterIndex) Returns the value of the specified column as a byte array.byte[]Returns the value of the specified column as a byte array.getCharacterStream(int parameterIndex) Returns the value of the specified column as a reader.getCharacterStream(String parameterName) Returns the value of the specified column as a reader.getClob(int parameterIndex) Returns the value of the specified column as a Clob.Returns the value of the specified column as a Clob.getDate(int parameterIndex) Returns the value of the specified column as a java.sql.Date.Returns the value of the specified column as a java.sql.Date using a specified time zone.Returns the value of the specified column as a java.sql.Date.Returns the value of the specified column as a java.sql.Date using a specified time zone.doublegetDouble(int parameterIndex) Returns the value of the specified column as a double.doubleReturns the value of the specified column as a double.floatgetFloat(int parameterIndex) Returns the value of the specified column as a float.floatReturns the value of the specified column as a float.intgetInt(int parameterIndex) Returns the value of the specified column as an int.intReturns the value of the specified column as an int.longgetLong(int parameterIndex) Returns the value of the specified column as a long.longReturns the value of the specified column as a long.getNCharacterStream(int parameterIndex) Returns the value of the specified column as a reader.getNCharacterStream(String parameterName) Returns the value of the specified column as a reader.getNClob(int parameterIndex) Returns the value of the specified column as a Clob.Returns the value of the specified column as a Clob.getNString(int parameterIndex) Returns the value of the specified column as a String.getNString(String parameterName) Returns the value of the specified column as a String.getObject(int parameterIndex) Returns a column value as a Java object.<T> TReturns the value of the specified column as a Java object of the specified type.[Not supported] Gets a column as a object using the specified type mapping.Returns a column value as a Java object.<T> TReturns the value of the specified column as a Java object of the specified type.[Not supported] Gets a column as a object using the specified type mapping.getRef(int parameterIndex) [Not supported] Gets a column as a reference.[Not supported] Gets a column as a reference.getRowId(int parameterIndex) [Not supported] Returns the value of the specified column as a row id.[Not supported] Returns the value of the specified column as a row id.shortgetShort(int parameterIndex) Returns the value of the specified column as a short.shortReturns the value of the specified column as a short.getSQLXML(int parameterIndex) Returns the value of the specified column as a SQLXML object.Returns the value of the specified column as a SQLXML object.getString(int parameterIndex) Returns the value of the specified column as a String.Returns the value of the specified column as a String.getTime(int parameterIndex) Returns the value of the specified column as a java.sql.Time.Returns the value of the specified column as a java.sql.Time using a specified time zone.Returns the value of the specified column as a java.sql.Time.Returns the value of the specified column as a java.sql.Time using a specified time zone.getTimestamp(int parameterIndex) Returns the value of the specified column as a java.sql.Timestamp.getTimestamp(int parameterIndex, Calendar cal) Returns the value of the specified column as a java.sql.Timestamp using a specified time zone.getTimestamp(String parameterName) Returns the value of the specified column as a java.sql.Timestamp.getTimestamp(String parameterName, Calendar cal) Returns the value of the specified column as a java.sql.Timestamp using a specified time zone.getURL(int parameterIndex) [Not supported][Not supported]voidregisterOutParameter(int parameterIndex, int sqlType) Registers the given OUT parameter.voidregisterOutParameter(int parameterIndex, int sqlType, int scale) Registers the given OUT parameter.voidregisterOutParameter(int parameterIndex, int sqlType, String typeName) Registers the given OUT parameter.voidregisterOutParameter(String parameterName, int sqlType) Registers the given OUT parameter.voidregisterOutParameter(String parameterName, int sqlType, int scale) Registers the given OUT parameter.voidregisterOutParameter(String parameterName, int sqlType, String typeName) Registers the given OUT parameter.voidsetAsciiStream(String parameterName, InputStream x) Sets the value of a parameter as an ASCII stream.voidsetAsciiStream(String parameterName, InputStream x, int length) Sets the value of a parameter as an ASCII stream.voidsetAsciiStream(String parameterName, InputStream x, long length) Sets the value of a parameter as an ASCII stream.voidsetBigDecimal(String parameterName, BigDecimal x) Sets the value of a parameter.voidsetBinaryStream(String parameterName, InputStream x) Sets the value of a parameter as an input stream.voidsetBinaryStream(String parameterName, InputStream x, int length) Sets the value of a parameter as an input stream.voidsetBinaryStream(String parameterName, InputStream x, long length) Sets the value of a parameter as an input stream.voidsetBlob(String parameterName, InputStream x) Sets the value of a parameter as a Blob.voidsetBlob(String parameterName, InputStream x, long length) Sets the value of a parameter as a Blob.voidSets the value of a parameter as a Blob.voidsetBoolean(String parameterName, boolean x) Sets the value of a parameter.voidSets the value of a parameter.voidSets the value of a parameter as a byte array.voidsetCharacterStream(String parameterName, Reader x) Sets the value of a parameter as a character stream.voidsetCharacterStream(String parameterName, Reader x, int length) Sets the value of a parameter as a character stream.voidsetCharacterStream(String parameterName, Reader x, long length) Sets the value of a parameter as a character stream.voidSets the value of a parameter as a character stream.voidSets the value of a parameter as a Clob.voidSets the value of a parameter as a Clob.voidSets the value of a parameter.voidSets the date using a specified time zone.voidSets the value of a parameter.voidSets the value of a parameter.voidSets the value of a parameter.voidSets the value of a parameter.voidsetNCharacterStream(String parameterName, Reader x) Sets the value of a parameter as a character stream.voidsetNCharacterStream(String parameterName, Reader x, long length) Sets the value of a parameter as a character stream.voidSets the value of a parameter as a Clob.voidSets the value of a parameter as a Clob.voidSets the value of a parameter as a Clob.voidsetNString(String parameterName, String x) Sets the value of a parameter.voidSets a parameter to null.voidSets a parameter to null.voidSets the value of a parameter.voidSets the value of a parameter.voidSets the value of a parameter.voidSets the value of a parameter.voidSets the value of a parameter.void[Not supported] Sets the value of a parameter as a row id.voidSets the value of a parameter.voidSets the value of a parameter as a SQLXML object.voidSets the value of a parameter.voidSets the time using a specified time zone.voidSets the time using a specified time zone.voidsetTimestamp(String parameterName, Timestamp x) Sets the value of a parameter.voidsetTimestamp(String parameterName, Timestamp x, Calendar cal) Sets the timestamp using a specified time zone.void[Not supported]booleanwasNull()Returns whether the last column accessed was null.Methods inherited from class org.h2.jdbc.JdbcPreparedStatement
addBatch, addBatch, clearBatch, clearParameters, close, execute, executeBatch, executeLargeBatch, executeQuery, executeQuery, 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, toStringMethods inherited from class org.h2.jdbc.JdbcStatement
cancel, clearWarnings, closeOldResultSet, closeOnCompletion, enquoteIdentifier, execute, execute, execute, execute, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isCancelled, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrapMethods inherited from class org.h2.message.TraceObject
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupportedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.sql.CallableStatement
registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameterMethods inherited from interface java.sql.PreparedStatement
addBatch, clearParameters, execute, executeQuery, 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, setURLMethods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
executeUpdate
Executes a statement (insert, update, delete, create, drop) and returns the update count. If another result set exists for this statement, this will be closed (even if this statement fails). If auto commit is on, this statement will be committed. If the statement is a DDL statement (create, drop, alter) and does not throw an exception, the current transaction (if any) is committed after executing the statement.- Specified by:
executeUpdatein interfacePreparedStatement- Overrides:
executeUpdatein classJdbcPreparedStatement- Returns:
- the update count (number of row affected by an insert, update or delete, or 0 if no rows or the statement was a create, drop, commit or rollback)
- Throws:
SQLException- if this object is closed or invalid- See Also:
-
executeLargeUpdate
Executes a statement (insert, update, delete, create, drop) and returns the update count. If another result set exists for this statement, this will be closed (even if this statement fails). If auto commit is on, this statement will be committed. If the statement is a DDL statement (create, drop, alter) and does not throw an exception, the current transaction (if any) is committed after executing the statement.- Specified by:
executeLargeUpdatein interfacePreparedStatement- Overrides:
executeLargeUpdatein classJdbcPreparedStatement- Returns:
- the update count (number of row affected by an insert, update or delete, or 0 if no rows or the statement was a create, drop, commit or rollback)
- Throws:
SQLException- if this object is closed or invalid
-
registerOutParameter
Registers the given OUT parameter.- Specified by:
registerOutParameterin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)sqlType- the data type (Types.x) - ignored- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException Registers the given OUT parameter.- Specified by:
registerOutParameterin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)sqlType- the data type (Types.x) - ignoredtypeName- the SQL type name - ignored- Throws:
SQLException
-
registerOutParameter
Registers the given OUT parameter.- Specified by:
registerOutParameterin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)sqlType- the data type (Types.x)scale- is ignored- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException Registers the given OUT parameter.- Specified by:
registerOutParameterin interfaceCallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x) - ignoredtypeName- the SQL type name - ignored- Throws:
SQLException
-
registerOutParameter
Registers the given OUT parameter.- Specified by:
registerOutParameterin interfaceCallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x) - ignoredscale- is ignored- Throws:
SQLException
-
registerOutParameter
Registers the given OUT parameter.- Specified by:
registerOutParameterin interfaceCallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x) - ignored- Throws:
SQLException
-
wasNull
Returns whether the last column accessed was null.- Specified by:
wasNullin interfaceCallableStatement- Returns:
- true if the last column accessed was null
- Throws:
SQLException
-
getURL
[Not supported]- Specified by:
getURLin interfaceCallableStatement- Throws:
SQLException
-
getString
Returns the value of the specified column as a String.- Specified by:
getStringin interfaceCallableStatement- Parameters:
parameterIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getBoolean
Returns the value of the specified column as a boolean.- Specified by:
getBooleanin interfaceCallableStatement- Parameters:
parameterIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getByte
Returns the value of the specified column as a byte.- Specified by:
getBytein interfaceCallableStatement- Parameters:
parameterIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getShort
Returns the value of the specified column as a short.- Specified by:
getShortin interfaceCallableStatement- Parameters:
parameterIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getInt
Returns the value of the specified column as an int.- Specified by:
getIntin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getLong
Returns the value of the specified column as a long.- Specified by:
getLongin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getFloat
Returns the value of the specified column as a float.- Specified by:
getFloatin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getDouble
Returns the value of the specified column as a double.- Specified by:
getDoublein interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getBigDecimal
Deprecated.Returns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)scale- is ignored- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getBytes
Returns the value of the specified column as a byte array.- Specified by:
getBytesin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getDate
Returns the value of the specified column as a java.sql.Date.Usage of this method is discouraged. Use
getObject(columnIndex, LocalDate.class)instead.- Specified by:
getDatein interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getTime
Returns the value of the specified column as a java.sql.Time.Usage of this method is discouraged. Use
getObject(columnIndex, LocalTime.class)instead.- Specified by:
getTimein interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getTimestamp
Returns the value of the specified column as a java.sql.Timestamp.Usage of this method is discouraged. Use
getObject(columnIndex, LocalDateTime.class)instead.- Specified by:
getTimestampin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getObject
Returns a column value as a Java object. The data is de-serialized into a Java object (on the client side).- Specified by:
getObjectin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value or null
- Throws:
SQLException- if the column is not found or if this object is closed
-
getBigDecimal
Returns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getObject
[Not supported] Gets a column as a object using the specified type mapping.- Specified by:
getObjectin interfaceCallableStatement- Throws:
SQLException
-
getRef
[Not supported] Gets a column as a reference.- Specified by:
getRefin interfaceCallableStatement- Throws:
SQLException
-
getBlob
Returns the value of the specified column as a Blob.- Specified by:
getBlobin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getClob
Returns the value of the specified column as a Clob.- Specified by:
getClobin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getArray
Returns the value of the specified column as an Array.- Specified by:
getArrayin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getDate
Returns the value of the specified column as a java.sql.Date using a specified time zone.Usage of this method is discouraged. Use
getObject(columnIndex, LocalDate.class)instead.- Specified by:
getDatein interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)cal- the calendar- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getTime
Returns the value of the specified column as a java.sql.Time using a specified time zone.Usage of this method is discouraged. Use
getObject(columnIndex, LocalTime.class)instead.- Specified by:
getTimein interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)cal- the calendar- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getTimestamp
Returns the value of the specified column as a java.sql.Timestamp using a specified time zone.Usage of this method is discouraged. Use
getObject(columnIndex, LocalDateTime.class)instead.- Specified by:
getTimestampin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)cal- the calendar- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getURL
[Not supported]- Specified by:
getURLin interfaceCallableStatement- Throws:
SQLException
-
getTimestamp
Returns the value of the specified column as a java.sql.Timestamp using a specified time zone.Usage of this method is discouraged. Use
getObject(parameterName, LocalDateTime.class)instead.- Specified by:
getTimestampin interfaceCallableStatement- Parameters:
parameterName- the parameter namecal- the calendar- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getTime
Returns the value of the specified column as a java.sql.Time using a specified time zone.Usage of this method is discouraged. Use
getObject(parameterName, LocalTime.class)instead.- Specified by:
getTimein interfaceCallableStatement- Parameters:
parameterName- the parameter namecal- the calendar- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getDate
Returns the value of the specified column as a java.sql.Date using a specified time zone.Usage of this method is discouraged. Use
getObject(parameterName, LocalDate.class)instead.- Specified by:
getDatein interfaceCallableStatement- Parameters:
parameterName- the parameter namecal- the calendar- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getArray
Returns the value of the specified column as an Array.- Specified by:
getArrayin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getClob
Returns the value of the specified column as a Clob.- Specified by:
getClobin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getBlob
Returns the value of the specified column as a Blob.- Specified by:
getBlobin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getRef
[Not supported] Gets a column as a reference.- Specified by:
getRefin interfaceCallableStatement- Throws:
SQLException
-
getObject
[Not supported] Gets a column as a object using the specified type mapping.- Specified by:
getObjectin interfaceCallableStatement- Throws:
SQLException
-
getBigDecimal
Returns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getObject
Returns a column value as a Java object. The data is de-serialized into a Java object (on the client side).- Specified by:
getObjectin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value or null
- Throws:
SQLException- if the column is not found or if this object is closed
-
getTimestamp
Returns the value of the specified column as a java.sql.Timestamp.Usage of this method is discouraged. Use
getObject(parameterName, LocalDateTime.class)instead.- Specified by:
getTimestampin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getTime
Returns the value of the specified column as a java.sql.Time.Usage of this method is discouraged. Use
getObject(parameterName, LocalTime.class)instead.- Specified by:
getTimein interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getDate
Returns the value of the specified column as a java.sql.Date.Usage of this method is discouraged. Use
getObject(parameterName, LocalDate.class)instead.- Specified by:
getDatein interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed- See Also:
-
getBytes
Returns the value of the specified column as a byte array.- Specified by:
getBytesin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getDouble
Returns the value of the specified column as a double.- Specified by:
getDoublein interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getFloat
Returns the value of the specified column as a float.- Specified by:
getFloatin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getLong
Returns the value of the specified column as a long.- Specified by:
getLongin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getInt
Returns the value of the specified column as an int.- Specified by:
getIntin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getShort
Returns the value of the specified column as a short.- Specified by:
getShortin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getByte
Returns the value of the specified column as a byte.- Specified by:
getBytein interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getBoolean
Returns the value of the specified column as a boolean.- Specified by:
getBooleanin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getString
Returns the value of the specified column as a String.- Specified by:
getStringin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getRowId
[Not supported] Returns the value of the specified column as a row id.- Specified by:
getRowIdin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Throws:
SQLException
-
getRowId
[Not supported] Returns the value of the specified column as a row id.- Specified by:
getRowIdin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Throws:
SQLException
-
getNClob
Returns the value of the specified column as a Clob.- Specified by:
getNClobin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getNClob
Returns the value of the specified column as a Clob.- Specified by:
getNClobin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getSQLXML
Returns the value of the specified column as a SQLXML object.- Specified by:
getSQLXMLin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getSQLXML
Returns the value of the specified column as a SQLXML object.- Specified by:
getSQLXMLin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getNString
Returns the value of the specified column as a String.- Specified by:
getNStringin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getNString
Returns the value of the specified column as a String.- Specified by:
getNStringin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getNCharacterStream
Returns the value of the specified column as a reader.- Specified by:
getNCharacterStreamin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getNCharacterStream
Returns the value of the specified column as a reader.- Specified by:
getNCharacterStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getCharacterStream
Returns the value of the specified column as a reader.- Specified by:
getCharacterStreamin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getCharacterStream
Returns the value of the specified column as a reader.- Specified by:
getCharacterStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
setNull
Sets a parameter to null.- Specified by:
setNullin interfaceCallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x)typeName- this parameter is ignored- Throws:
SQLException- if this object is closed
-
setNull
Sets a parameter to null.- Specified by:
setNullin interfaceCallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x)- Throws:
SQLException- if this object is closed
-
setTimestamp
Sets the timestamp using a specified time zone. The value will be converted to the local time zone.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalDateTimeparameter instead.- Specified by:
setTimestampin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuecal- the calendar- Throws:
SQLException- if this object is closed- See Also:
-
setTime
Sets the time using a specified time zone. The value will be converted to the local time zone.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalTimeparameter instead.- Specified by:
setTimein interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuecal- the calendar- Throws:
SQLException- if this object is closed- See Also:
-
setDate
Sets the date using a specified time zone. The value will be converted to the local time zone.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalDateparameter instead.- Specified by:
setDatein interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuecal- the calendar- Throws:
SQLException- if this object is closed- See Also:
-
setCharacterStream
Sets the value of a parameter as a character stream. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setCharacterStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
SQLException- if this object is closed
-
setObject
Sets the value of a parameter. Objects of unknown classes are serialized (on the client side).- Specified by:
setObjectin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setObject
Sets the value of a parameter. The object is converted, if required, to the specified data type before sending to the database. Objects of unknown classes are serialized (on the client side).- Specified by:
setObjectin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value, null is allowedtargetSqlType- the type as defined in java.sql.Types- Throws:
SQLException- if this object is closed
-
setObject
public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException Sets the value of a parameter. The object is converted, if required, to the specified data type before sending to the database. Objects of unknown classes are serialized (on the client side).- Specified by:
setObjectin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value, null is allowedtargetSqlType- the type as defined in java.sql.Typesscale- is ignored- Throws:
SQLException- if this object is closed
-
setObject
Sets the value of a parameter. The object is converted, if required, to the specified data type before sending to the database. Objects of unknown classes are serialized (on the client side).- Specified by:
setObjectin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value, null is allowedtargetSqlType- the type- Throws:
SQLException- if this object is closed
-
setObject
public void setObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException Sets the value of a parameter. The object is converted, if required, to the specified data type before sending to the database. Objects of unknown classes are serialized (on the client side).- Specified by:
setObjectin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value, null is allowedtargetSqlType- the typescaleOrLength- is ignored- Throws:
SQLException- if this object is closed
-
setBinaryStream
Sets the value of a parameter as an input stream. This method does not close the stream. The stream may be closed after executing the statement.- Specified by:
setBinaryStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
SQLException- if this object is closed
-
setAsciiStream
Sets the value of a parameter as an ASCII stream. This method does not close the stream. The stream may be closed after executing the statement.- Specified by:
setAsciiStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
SQLException- if this object is closed
-
setTimestamp
Sets the value of a parameter.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalDateTimeparameter instead.- Specified by:
setTimestampin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed- See Also:
-
setTime
Sets the time using a specified time zone.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalTimeparameter instead.- Specified by:
setTimein interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed- See Also:
-
setDate
Sets the value of a parameter.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalDateparameter instead.- Specified by:
setDatein interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed- See Also:
-
setBytes
Sets the value of a parameter as a byte array.- Specified by:
setBytesin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setString
Sets the value of a parameter.- Specified by:
setStringin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setBigDecimal
Sets the value of a parameter.- Specified by:
setBigDecimalin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setDouble
Sets the value of a parameter.- Specified by:
setDoublein interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setFloat
Sets the value of a parameter.- Specified by:
setFloatin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setLong
Sets the value of a parameter.- Specified by:
setLongin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setInt
Sets the value of a parameter.- Specified by:
setIntin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setShort
Sets the value of a parameter.- Specified by:
setShortin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setByte
Sets the value of a parameter.- Specified by:
setBytein interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setBoolean
Sets the value of a parameter.- Specified by:
setBooleanin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setURL
[Not supported]- Specified by:
setURLin interfaceCallableStatement- Throws:
SQLException
-
setRowId
[Not supported] Sets the value of a parameter as a row id.- Specified by:
setRowIdin interfaceCallableStatement- Throws:
SQLException
-
setNString
Sets the value of a parameter.- Specified by:
setNStringin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setNCharacterStream
Sets the value of a parameter as a character stream. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setNCharacterStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
SQLException- if this object is closed
-
setNClob
Sets the value of a parameter as a Clob.- Specified by:
setNClobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setClob
Sets the value of a parameter as a Clob. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setClobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
SQLException- if this object is closed
-
setBlob
Sets the value of a parameter as a Blob. This method does not close the stream. The stream may be closed after executing the statement.- Specified by:
setBlobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
SQLException- if this object is closed
-
setNClob
Sets the value of a parameter as a Clob. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setNClobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
SQLException- if this object is closed
-
setBlob
Sets the value of a parameter as a Blob.- Specified by:
setBlobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setClob
Sets the value of a parameter as a Clob.- Specified by:
setClobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setAsciiStream
Sets the value of a parameter as an ASCII stream. This method does not close the stream. The stream may be closed after executing the statement.- Specified by:
setAsciiStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setAsciiStream
Sets the value of a parameter as an ASCII stream. This method does not close the stream. The stream may be closed after executing the statement.- Specified by:
setAsciiStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
SQLException- if this object is closed
-
setBinaryStream
Sets the value of a parameter as an input stream. This method does not close the stream. The stream may be closed after executing the statement.- Specified by:
setBinaryStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setBinaryStream
Sets the value of a parameter as an input stream. This method does not close the stream. The stream may be closed after executing the statement.- Specified by:
setBinaryStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
SQLException- if this object is closed
-
setBlob
Sets the value of a parameter as a Blob. This method does not close the stream. The stream may be closed after executing the statement.- Specified by:
setBlobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setCharacterStream
Sets the value of a parameter as a character stream. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setCharacterStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setCharacterStream
Sets the value of a parameter as a character stream. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setCharacterStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
SQLException- if this object is closed
-
setClob
Sets the value of a parameter as a character stream. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setClobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setNCharacterStream
Sets the value of a parameter as a character stream. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setNCharacterStreamin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setNClob
Sets the value of a parameter as a Clob. This method does not close the reader. The reader may be closed after executing the statement.- Specified by:
setNClobin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
setSQLXML
Sets the value of a parameter as a SQLXML object.- Specified by:
setSQLXMLin interfaceCallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
SQLException- if this object is closed
-
getObject
Returns the value of the specified column as a Java object of the specified type.- Specified by:
getObjectin interfaceCallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)type- the class of the returned value- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getObject
Returns the value of the specified column as a Java object of the specified type.- Specified by:
getObjectin interfaceCallableStatement- Parameters:
parameterName- the parameter nametype- the class of the returned value- Returns:
- the value
- Throws:
SQLException- if the column is not found or if this object is closed
-
getBigDecimal(int)