Class JdbcCallableStatement
- java.lang.Object
-
- org.h2.message.TraceObject
-
- org.h2.jdbc.JdbcStatement
-
- org.h2.jdbc.JdbcPreparedStatement
-
- org.h2.jdbc.JdbcCallableStatement
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.CallableStatement,java.sql.PreparedStatement,java.sql.Statement,java.sql.Wrapper,JdbcStatementBackwardsCompat
public final class JdbcCallableStatement extends JdbcPreparedStatement implements java.sql.CallableStatement
Represents a callable statement.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 Modifier and Type Field Description private intmaxOutParametersprivate java.util.HashMap<java.lang.String,java.lang.Integer>namedParametersprivate java.util.BitSetoutParameters-
Fields inherited from class org.h2.jdbc.JdbcPreparedStatement
command
-
Fields inherited from class org.h2.jdbc.JdbcStatement
conn, fetchSize, generatedKeys, maxRows, resultSet, resultSetConcurrency, resultSetType, session, updateCount
-
Fields 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, XID
-
-
Constructor Summary
Constructors Constructor Description JdbcCallableStatement(JdbcConnection conn, java.lang.String sql, int id, int resultSetType, int resultSetConcurrency)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private voidcheckIndexBounds(int parameterIndex)private voidcheckRegistered(int parameterIndex)longexecuteLargeUpdate()Executes a statement (insert, update, delete, create, drop) and returns the update count.intexecuteUpdate()Executes a statement (insert, update, delete, create, drop) and returns the update count.java.sql.ArraygetArray(int parameterIndex)Returns the value of the specified column as an Array.java.sql.ArraygetArray(java.lang.String parameterName)Returns the value of the specified column as an Array.java.math.BigDecimalgetBigDecimal(int parameterIndex)Returns the value of the specified column as a BigDecimal.java.math.BigDecimalgetBigDecimal(int parameterIndex, int scale)Deprecated.java.math.BigDecimalgetBigDecimal(java.lang.String parameterName)Returns the value of the specified column as a BigDecimal.java.sql.BlobgetBlob(int parameterIndex)Returns the value of the specified column as a Blob.java.sql.BlobgetBlob(java.lang.String parameterName)Returns the value of the specified column as a Blob.booleangetBoolean(int parameterIndex)Returns the value of the specified column as a boolean.booleangetBoolean(java.lang.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.bytegetByte(java.lang.String parameterName)Returns 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[]getBytes(java.lang.String parameterName)Returns the value of the specified column as a byte array.java.io.ReadergetCharacterStream(int parameterIndex)Returns the value of the specified column as a reader.java.io.ReadergetCharacterStream(java.lang.String parameterName)Returns the value of the specified column as a reader.private java.sql.ResultSetMetaDatagetCheckedMetaData()java.sql.ClobgetClob(int parameterIndex)Returns the value of the specified column as a Clob.java.sql.ClobgetClob(java.lang.String parameterName)Returns the value of the specified column as a Clob.java.sql.DategetDate(int parameterIndex)Returns the value of the specified column as a java.sql.Date.java.sql.DategetDate(int parameterIndex, java.util.Calendar cal)Returns the value of the specified column as a java.sql.Date using a specified time zone.java.sql.DategetDate(java.lang.String parameterName)Returns the value of the specified column as a java.sql.Date.java.sql.DategetDate(java.lang.String parameterName, java.util.Calendar cal)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.doublegetDouble(java.lang.String parameterName)Returns the value of the specified column as a double.floatgetFloat(int parameterIndex)Returns the value of the specified column as a float.floatgetFloat(java.lang.String parameterName)Returns the value of the specified column as a float.private intgetIndexForName(java.lang.String parameterName)intgetInt(int parameterIndex)Returns the value of the specified column as an int.intgetInt(java.lang.String parameterName)Returns the value of the specified column as an int.longgetLong(int parameterIndex)Returns the value of the specified column as a long.longgetLong(java.lang.String parameterName)Returns the value of the specified column as a long.java.io.ReadergetNCharacterStream(int parameterIndex)Returns the value of the specified column as a reader.java.io.ReadergetNCharacterStream(java.lang.String parameterName)Returns the value of the specified column as a reader.java.sql.NClobgetNClob(int parameterIndex)Returns the value of the specified column as a Clob.java.sql.NClobgetNClob(java.lang.String parameterName)Returns the value of the specified column as a Clob.java.lang.StringgetNString(int parameterIndex)Returns the value of the specified column as a String.java.lang.StringgetNString(java.lang.String parameterName)Returns the value of the specified column as a String.java.lang.ObjectgetObject(int parameterIndex)Returns a column value as a Java object.<T> TgetObject(int parameterIndex, java.lang.Class<T> type)Returns the value of the specified column as a Java object of the specified type.java.lang.ObjectgetObject(int parameterIndex, java.util.Map<java.lang.String,java.lang.Class<?>> map)[Not supported] Gets a column as a object using the specified type mapping.java.lang.ObjectgetObject(java.lang.String parameterName)Returns a column value as a Java object.<T> TgetObject(java.lang.String parameterName, java.lang.Class<T> type)Returns the value of the specified column as a Java object of the specified type.java.lang.ObjectgetObject(java.lang.String parameterName, java.util.Map<java.lang.String,java.lang.Class<?>> map)[Not supported] Gets a column as a object using the specified type mapping.private JdbcResultSetgetOpenResultSet()java.sql.RefgetRef(int parameterIndex)[Not supported] Gets a column as a reference.java.sql.RefgetRef(java.lang.String parameterName)[Not supported] Gets a column as a reference.java.sql.RowIdgetRowId(int parameterIndex)[Not supported] Returns the value of the specified column as a row id.java.sql.RowIdgetRowId(java.lang.String parameterName)[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.shortgetShort(java.lang.String parameterName)Returns the value of the specified column as a short.java.sql.SQLXMLgetSQLXML(int parameterIndex)Returns the value of the specified column as a SQLXML object.java.sql.SQLXMLgetSQLXML(java.lang.String parameterName)Returns the value of the specified column as a SQLXML object.java.lang.StringgetString(int parameterIndex)Returns the value of the specified column as a String.java.lang.StringgetString(java.lang.String parameterName)Returns the value of the specified column as a String.java.sql.TimegetTime(int parameterIndex)Returns the value of the specified column as a java.sql.Time.java.sql.TimegetTime(int parameterIndex, java.util.Calendar cal)Returns the value of the specified column as a java.sql.Time using a specified time zone.java.sql.TimegetTime(java.lang.String parameterName)Returns the value of the specified column as a java.sql.Time.java.sql.TimegetTime(java.lang.String parameterName, java.util.Calendar cal)Returns the value of the specified column as a java.sql.Time using a specified time zone.java.sql.TimestampgetTimestamp(int parameterIndex)Returns the value of the specified column as a java.sql.Timestamp.java.sql.TimestampgetTimestamp(int parameterIndex, java.util.Calendar cal)Returns the value of the specified column as a java.sql.Timestamp using a specified time zone.java.sql.TimestampgetTimestamp(java.lang.String parameterName)Returns the value of the specified column as a java.sql.Timestamp.java.sql.TimestampgetTimestamp(java.lang.String parameterName, java.util.Calendar cal)Returns the value of the specified column as a java.sql.Timestamp using a specified time zone.java.net.URLgetURL(int parameterIndex)[Not supported]java.net.URLgetURL(java.lang.String parameterName)[Not supported]private voidregisterOutParameter(int parameterIndex)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, java.lang.String typeName)Registers the given OUT parameter.voidregisterOutParameter(java.lang.String parameterName, int sqlType)Registers the given OUT parameter.voidregisterOutParameter(java.lang.String parameterName, int sqlType, int scale)Registers the given OUT parameter.voidregisterOutParameter(java.lang.String parameterName, int sqlType, java.lang.String typeName)Registers the given OUT parameter.voidsetAsciiStream(java.lang.String parameterName, java.io.InputStream x)Sets the value of a parameter as an ASCII stream.voidsetAsciiStream(java.lang.String parameterName, java.io.InputStream x, int length)Sets the value of a parameter as an ASCII stream.voidsetAsciiStream(java.lang.String parameterName, java.io.InputStream x, long length)Sets the value of a parameter as an ASCII stream.voidsetBigDecimal(java.lang.String parameterName, java.math.BigDecimal x)Sets the value of a parameter.voidsetBinaryStream(java.lang.String parameterName, java.io.InputStream x)Sets the value of a parameter as an input stream.voidsetBinaryStream(java.lang.String parameterName, java.io.InputStream x, int length)Sets the value of a parameter as an input stream.voidsetBinaryStream(java.lang.String parameterName, java.io.InputStream x, long length)Sets the value of a parameter as an input stream.voidsetBlob(java.lang.String parameterName, java.io.InputStream x)Sets the value of a parameter as a Blob.voidsetBlob(java.lang.String parameterName, java.io.InputStream x, long length)Sets the value of a parameter as a Blob.voidsetBlob(java.lang.String parameterName, java.sql.Blob x)Sets the value of a parameter as a Blob.voidsetBoolean(java.lang.String parameterName, boolean x)Sets the value of a parameter.voidsetByte(java.lang.String parameterName, byte x)Sets the value of a parameter.voidsetBytes(java.lang.String parameterName, byte[] x)Sets the value of a parameter as a byte array.voidsetCharacterStream(java.lang.String parameterName, java.io.Reader x)Sets the value of a parameter as a character stream.voidsetCharacterStream(java.lang.String parameterName, java.io.Reader x, int length)Sets the value of a parameter as a character stream.voidsetCharacterStream(java.lang.String parameterName, java.io.Reader x, long length)Sets the value of a parameter as a character stream.voidsetClob(java.lang.String parameterName, java.io.Reader x)Sets the value of a parameter as a character stream.voidsetClob(java.lang.String parameterName, java.io.Reader x, long length)Sets the value of a parameter as a Clob.voidsetClob(java.lang.String parameterName, java.sql.Clob x)Sets the value of a parameter as a Clob.voidsetDate(java.lang.String parameterName, java.sql.Date x)Sets the value of a parameter.voidsetDate(java.lang.String parameterName, java.sql.Date x, java.util.Calendar cal)Sets the date using a specified time zone.voidsetDouble(java.lang.String parameterName, double x)Sets the value of a parameter.voidsetFloat(java.lang.String parameterName, float x)Sets the value of a parameter.voidsetInt(java.lang.String parameterName, int x)Sets the value of a parameter.voidsetLong(java.lang.String parameterName, long x)Sets the value of a parameter.voidsetNCharacterStream(java.lang.String parameterName, java.io.Reader x)Sets the value of a parameter as a character stream.voidsetNCharacterStream(java.lang.String parameterName, java.io.Reader x, long length)Sets the value of a parameter as a character stream.voidsetNClob(java.lang.String parameterName, java.io.Reader x)Sets the value of a parameter as a Clob.voidsetNClob(java.lang.String parameterName, java.io.Reader x, long length)Sets the value of a parameter as a Clob.voidsetNClob(java.lang.String parameterName, java.sql.NClob x)Sets the value of a parameter as a Clob.voidsetNString(java.lang.String parameterName, java.lang.String x)Sets the value of a parameter.voidsetNull(java.lang.String parameterName, int sqlType)Sets a parameter to null.voidsetNull(java.lang.String parameterName, int sqlType, java.lang.String typeName)Sets a parameter to null.voidsetObject(java.lang.String parameterName, java.lang.Object x)Sets the value of a parameter.voidsetObject(java.lang.String parameterName, java.lang.Object x, int targetSqlType)Sets the value of a parameter.voidsetObject(java.lang.String parameterName, java.lang.Object x, int targetSqlType, int scale)Sets the value of a parameter.voidsetObject(java.lang.String parameterName, java.lang.Object x, java.sql.SQLType targetSqlType)Sets the value of a parameter.voidsetObject(java.lang.String parameterName, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength)Sets the value of a parameter.voidsetRowId(java.lang.String parameterName, java.sql.RowId x)[Not supported] Sets the value of a parameter as a row id.voidsetShort(java.lang.String parameterName, short x)Sets the value of a parameter.voidsetSQLXML(java.lang.String parameterName, java.sql.SQLXML x)Sets the value of a parameter as a SQLXML object.voidsetString(java.lang.String parameterName, java.lang.String x)Sets the value of a parameter.voidsetTime(java.lang.String parameterName, java.sql.Time x)Sets the time using a specified time zone.voidsetTime(java.lang.String parameterName, java.sql.Time x, java.util.Calendar cal)Sets the time using a specified time zone.voidsetTimestamp(java.lang.String parameterName, java.sql.Timestamp x)Sets the value of a parameter.voidsetTimestamp(java.lang.String parameterName, java.sql.Timestamp x, java.util.Calendar cal)Sets the timestamp using a specified time zone.voidsetURL(java.lang.String parameterName, java.net.URL val)[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, getGeneratedKeys, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCachedColumnLabelMap, 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, toString
-
Methods inherited from class org.h2.jdbc.JdbcStatement
cancel, checkClosed, clearWarnings, closeIfCloseOnCompletion, closeOldResultSet, closeOnCompletion, enquoteIdentifier, execute, execute, execute, execute, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isCancelled, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, isWrapperFor, onLazyResultSetClose, setCursorName, setEscapeProcessing, setExecutingStatement, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap
-
Methods 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, unsupported
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.sql.CallableStatement
registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter
-
Methods 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, setURL
-
Methods 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, setQueryTimeout
-
-
-
-
Constructor Detail
-
JdbcCallableStatement
JdbcCallableStatement(JdbcConnection conn, java.lang.String sql, int id, int resultSetType, int resultSetConcurrency)
-
-
Method Detail
-
executeUpdate
public int executeUpdate() throws java.sql.SQLExceptionExecutes 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 interfacejava.sql.PreparedStatement- 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:
java.sql.SQLException- if this object is closed or invalid- See Also:
JdbcPreparedStatement.executeLargeUpdate()
-
executeLargeUpdate
public long executeLargeUpdate() throws java.sql.SQLExceptionExecutes 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 interfacejava.sql.PreparedStatement- 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:
java.sql.SQLException- if this object is closed or invalid
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType) throws java.sql.SQLExceptionRegisters the given OUT parameter.- Specified by:
registerOutParameterin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)sqlType- the data type (Types.x) - ignored- Throws:
java.sql.SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, java.lang.String typeName) throws java.sql.SQLExceptionRegisters the given OUT parameter.- Specified by:
registerOutParameterin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)sqlType- the data type (Types.x) - ignoredtypeName- the SQL type name - ignored- Throws:
java.sql.SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws java.sql.SQLExceptionRegisters the given OUT parameter.- Specified by:
registerOutParameterin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)sqlType- the data type (Types.x)scale- is ignored- Throws:
java.sql.SQLException
-
registerOutParameter
public void registerOutParameter(java.lang.String parameterName, int sqlType, java.lang.String typeName) throws java.sql.SQLExceptionRegisters the given OUT parameter.- Specified by:
registerOutParameterin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x) - ignoredtypeName- the SQL type name - ignored- Throws:
java.sql.SQLException
-
registerOutParameter
public void registerOutParameter(java.lang.String parameterName, int sqlType, int scale) throws java.sql.SQLExceptionRegisters the given OUT parameter.- Specified by:
registerOutParameterin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x) - ignoredscale- is ignored- Throws:
java.sql.SQLException
-
registerOutParameter
public void registerOutParameter(java.lang.String parameterName, int sqlType) throws java.sql.SQLExceptionRegisters the given OUT parameter.- Specified by:
registerOutParameterin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x) - ignored- Throws:
java.sql.SQLException
-
wasNull
public boolean wasNull() throws java.sql.SQLExceptionReturns whether the last column accessed was null.- Specified by:
wasNullin interfacejava.sql.CallableStatement- Returns:
- true if the last column accessed was null
- Throws:
java.sql.SQLException
-
getURL
public java.net.URL getURL(int parameterIndex) throws java.sql.SQLException[Not supported]- Specified by:
getURLin interfacejava.sql.CallableStatement- Throws:
java.sql.SQLException
-
getString
public java.lang.String getString(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a String.- Specified by:
getStringin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getBoolean
public boolean getBoolean(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a boolean.- Specified by:
getBooleanin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getByte
public byte getByte(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a byte.- Specified by:
getBytein interfacejava.sql.CallableStatement- Parameters:
parameterIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getShort
public short getShort(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a short.- Specified by:
getShortin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getInt
public int getInt(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as an int.- Specified by:
getIntin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getLong
public long getLong(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a long.- Specified by:
getLongin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getFloat
public float getFloat(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a float.- Specified by:
getFloatin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getDouble
public double getDouble(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a double.- Specified by:
getDoublein interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getBigDecimal
@Deprecated public java.math.BigDecimal getBigDecimal(int parameterIndex, int scale) throws java.sql.SQLExceptionDeprecated.Returns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)scale- is ignored- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getBytes
public byte[] getBytes(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a byte array.- Specified by:
getBytesin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getDate
public java.sql.Date getDate(int parameterIndex) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(int, Class)
-
getTime
public java.sql.Time getTime(int parameterIndex) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(int, Class)
-
getTimestamp
public java.sql.Timestamp getTimestamp(int parameterIndex) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(int, Class)
-
getObject
public java.lang.Object getObject(int parameterIndex) throws java.sql.SQLExceptionReturns a column value as a Java object. The data is de-serialized into a Java object (on the client side).- Specified by:
getObjectin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value or null
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getObject
public java.lang.Object getObject(int parameterIndex, java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException[Not supported] Gets a column as a object using the specified type mapping.- Specified by:
getObjectin interfacejava.sql.CallableStatement- Throws:
java.sql.SQLException
-
getRef
public java.sql.Ref getRef(int parameterIndex) throws java.sql.SQLException[Not supported] Gets a column as a reference.- Specified by:
getRefin interfacejava.sql.CallableStatement- Throws:
java.sql.SQLException
-
getBlob
public java.sql.Blob getBlob(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a Blob.- Specified by:
getBlobin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getClob
public java.sql.Clob getClob(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a Clob.- Specified by:
getClobin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getArray
public java.sql.Array getArray(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as an Array.- Specified by:
getArrayin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getDate
public java.sql.Date getDate(int parameterIndex, java.util.Calendar cal) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)cal- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(int, Class)
-
getTime
public java.sql.Time getTime(int parameterIndex, java.util.Calendar cal) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)cal- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(int, Class)
-
getTimestamp
public java.sql.Timestamp getTimestamp(int parameterIndex, java.util.Calendar cal) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)cal- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(int, Class)
-
getURL
public java.net.URL getURL(java.lang.String parameterName) throws java.sql.SQLException[Not supported]- Specified by:
getURLin interfacejava.sql.CallableStatement- Throws:
java.sql.SQLException
-
getTimestamp
public java.sql.Timestamp getTimestamp(java.lang.String parameterName, java.util.Calendar cal) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namecal- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(String, Class)
-
getTime
public java.sql.Time getTime(java.lang.String parameterName, java.util.Calendar cal) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namecal- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(String, Class)
-
getDate
public java.sql.Date getDate(java.lang.String parameterName, java.util.Calendar cal) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namecal- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(String, Class)
-
getArray
public java.sql.Array getArray(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as an Array.- Specified by:
getArrayin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getClob
public java.sql.Clob getClob(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a Clob.- Specified by:
getClobin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getBlob
public java.sql.Blob getBlob(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a Blob.- Specified by:
getBlobin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getRef
public java.sql.Ref getRef(java.lang.String parameterName) throws java.sql.SQLException[Not supported] Gets a column as a reference.- Specified by:
getRefin interfacejava.sql.CallableStatement- Throws:
java.sql.SQLException
-
getObject
public java.lang.Object getObject(java.lang.String parameterName, java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException[Not supported] Gets a column as a object using the specified type mapping.- Specified by:
getObjectin interfacejava.sql.CallableStatement- Throws:
java.sql.SQLException
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getObject
public java.lang.Object getObject(java.lang.String parameterName) throws java.sql.SQLExceptionReturns a column value as a Java object. The data is de-serialized into a Java object (on the client side).- Specified by:
getObjectin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value or null
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getTimestamp
public java.sql.Timestamp getTimestamp(java.lang.String parameterName) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(String, Class)
-
getTime
public java.sql.Time getTime(java.lang.String parameterName) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(String, Class)
-
getDate
public java.sql.Date getDate(java.lang.String parameterName) throws java.sql.SQLExceptionReturns 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed- See Also:
getObject(String, Class)
-
getBytes
public byte[] getBytes(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a byte array.- Specified by:
getBytesin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getDouble
public double getDouble(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a double.- Specified by:
getDoublein interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getFloat
public float getFloat(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a float.- Specified by:
getFloatin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getLong
public long getLong(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a long.- Specified by:
getLongin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getInt
public int getInt(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as an int.- Specified by:
getIntin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getShort
public short getShort(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a short.- Specified by:
getShortin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getByte
public byte getByte(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a byte.- Specified by:
getBytein interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getBoolean
public boolean getBoolean(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a boolean.- Specified by:
getBooleanin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getString
public java.lang.String getString(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a String.- Specified by:
getStringin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getRowId
public java.sql.RowId getRowId(int parameterIndex) throws java.sql.SQLException[Not supported] Returns the value of the specified column as a row id.- Specified by:
getRowIdin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Throws:
java.sql.SQLException
-
getRowId
public java.sql.RowId getRowId(java.lang.String parameterName) throws java.sql.SQLException[Not supported] Returns the value of the specified column as a row id.- Specified by:
getRowIdin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Throws:
java.sql.SQLException
-
getNClob
public java.sql.NClob getNClob(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a Clob.- Specified by:
getNClobin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getNClob
public java.sql.NClob getNClob(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a Clob.- Specified by:
getNClobin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getSQLXML
public java.sql.SQLXML getSQLXML(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a SQLXML object.- Specified by:
getSQLXMLin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getSQLXML
public java.sql.SQLXML getSQLXML(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a SQLXML object.- Specified by:
getSQLXMLin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getNString
public java.lang.String getNString(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a String.- Specified by:
getNStringin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getNString
public java.lang.String getNString(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a String.- Specified by:
getNStringin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getNCharacterStream
public java.io.Reader getNCharacterStream(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a reader.- Specified by:
getNCharacterStreamin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getNCharacterStream
public java.io.Reader getNCharacterStream(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a reader.- Specified by:
getNCharacterStreamin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getCharacterStream
public java.io.Reader getCharacterStream(int parameterIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a reader.- Specified by:
getCharacterStreamin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getCharacterStream
public java.io.Reader getCharacterStream(java.lang.String parameterName) throws java.sql.SQLExceptionReturns the value of the specified column as a reader.- Specified by:
getCharacterStreamin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter name- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
setNull
public void setNull(java.lang.String parameterName, int sqlType, java.lang.String typeName) throws java.sql.SQLExceptionSets a parameter to null.- Specified by:
setNullin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x)typeName- this parameter is ignored- Throws:
java.sql.SQLException- if this object is closed
-
setNull
public void setNull(java.lang.String parameterName, int sqlType) throws java.sql.SQLExceptionSets a parameter to null.- Specified by:
setNullin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namesqlType- the data type (Types.x)- Throws:
java.sql.SQLException- if this object is closed
-
setTimestamp
public void setTimestamp(java.lang.String parameterName, java.sql.Timestamp x, java.util.Calendar cal) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuecal- the calendar- Throws:
java.sql.SQLException- if this object is closed- See Also:
setObject(String, Object)
-
setTime
public void setTime(java.lang.String parameterName, java.sql.Time x, java.util.Calendar cal) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuecal- the calendar- Throws:
java.sql.SQLException- if this object is closed- See Also:
setObject(String, Object)
-
setDate
public void setDate(java.lang.String parameterName, java.sql.Date x, java.util.Calendar cal) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuecal- the calendar- Throws:
java.sql.SQLException- if this object is closed- See Also:
setObject(String, Object)
-
setCharacterStream
public void setCharacterStream(java.lang.String parameterName, java.io.Reader x, int length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
java.sql.SQLException- if this object is closed
-
setObject
public void setObject(java.lang.String parameterName, java.lang.Object x) throws java.sql.SQLExceptionSets the value of a parameter. Objects of unknown classes are serialized (on the client side).- Specified by:
setObjectin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setObject
public void setObject(java.lang.String parameterName, java.lang.Object x, int targetSqlType) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value, null is allowedtargetSqlType- the type as defined in java.sql.Types- Throws:
java.sql.SQLException- if this object is closed
-
setObject
public void setObject(java.lang.String parameterName, java.lang.Object x, int targetSqlType, int scale) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value, null is allowedtargetSqlType- the type as defined in java.sql.Typesscale- is ignored- Throws:
java.sql.SQLException- if this object is closed
-
setObject
public void setObject(java.lang.String parameterName, java.lang.Object x, java.sql.SQLType targetSqlType) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value, null is allowedtargetSqlType- the type- Throws:
java.sql.SQLException- if this object is closed
-
setObject
public void setObject(java.lang.String parameterName, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value, null is allowedtargetSqlType- the typescaleOrLength- is ignored- Throws:
java.sql.SQLException- if this object is closed
-
setBinaryStream
public void setBinaryStream(java.lang.String parameterName, java.io.InputStream x, int length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
java.sql.SQLException- if this object is closed
-
setAsciiStream
public void setAsciiStream(java.lang.String parameterName, java.io.InputStream x, long length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
java.sql.SQLException- if this object is closed
-
setTimestamp
public void setTimestamp(java.lang.String parameterName, java.sql.Timestamp x) throws java.sql.SQLExceptionSets the value of a parameter.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalDateTimeparameter instead.- Specified by:
setTimestampin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed- See Also:
setObject(String, Object)
-
setTime
public void setTime(java.lang.String parameterName, java.sql.Time x) throws java.sql.SQLExceptionSets the time using a specified time zone.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalTimeparameter instead.- Specified by:
setTimein interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed- See Also:
setObject(String, Object)
-
setDate
public void setDate(java.lang.String parameterName, java.sql.Date x) throws java.sql.SQLExceptionSets the value of a parameter.Usage of this method is discouraged. Use
setObject(parameterName, value)withLocalDateparameter instead.- Specified by:
setDatein interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed- See Also:
setObject(String, Object)
-
setBytes
public void setBytes(java.lang.String parameterName, byte[] x) throws java.sql.SQLExceptionSets the value of a parameter as a byte array.- Specified by:
setBytesin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setString
public void setString(java.lang.String parameterName, java.lang.String x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setStringin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setBigDecimal
public void setBigDecimal(java.lang.String parameterName, java.math.BigDecimal x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setBigDecimalin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setDouble
public void setDouble(java.lang.String parameterName, double x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setDoublein interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setFloat
public void setFloat(java.lang.String parameterName, float x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setFloatin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setLong
public void setLong(java.lang.String parameterName, long x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setLongin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setInt
public void setInt(java.lang.String parameterName, int x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setIntin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setShort
public void setShort(java.lang.String parameterName, short x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setShortin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setByte
public void setByte(java.lang.String parameterName, byte x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setBytein interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setBoolean
public void setBoolean(java.lang.String parameterName, boolean x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setBooleanin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setURL
public void setURL(java.lang.String parameterName, java.net.URL val) throws java.sql.SQLException[Not supported]- Specified by:
setURLin interfacejava.sql.CallableStatement- Throws:
java.sql.SQLException
-
setRowId
public void setRowId(java.lang.String parameterName, java.sql.RowId x) throws java.sql.SQLException[Not supported] Sets the value of a parameter as a row id.- Specified by:
setRowIdin interfacejava.sql.CallableStatement- Throws:
java.sql.SQLException
-
setNString
public void setNString(java.lang.String parameterName, java.lang.String x) throws java.sql.SQLExceptionSets the value of a parameter.- Specified by:
setNStringin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setNCharacterStream
public void setNCharacterStream(java.lang.String parameterName, java.io.Reader x, long length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
java.sql.SQLException- if this object is closed
-
setNClob
public void setNClob(java.lang.String parameterName, java.sql.NClob x) throws java.sql.SQLExceptionSets the value of a parameter as a Clob.- Specified by:
setNClobin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setClob
public void setClob(java.lang.String parameterName, java.io.Reader x, long length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
java.sql.SQLException- if this object is closed
-
setBlob
public void setBlob(java.lang.String parameterName, java.io.InputStream x, long length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
java.sql.SQLException- if this object is closed
-
setNClob
public void setNClob(java.lang.String parameterName, java.io.Reader x, long length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
java.sql.SQLException- if this object is closed
-
setBlob
public void setBlob(java.lang.String parameterName, java.sql.Blob x) throws java.sql.SQLExceptionSets the value of a parameter as a Blob.- Specified by:
setBlobin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setClob
public void setClob(java.lang.String parameterName, java.sql.Clob x) throws java.sql.SQLExceptionSets the value of a parameter as a Clob.- Specified by:
setClobin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setAsciiStream
public void setAsciiStream(java.lang.String parameterName, java.io.InputStream x) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setAsciiStream
public void setAsciiStream(java.lang.String parameterName, java.io.InputStream x, int length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
java.sql.SQLException- if this object is closed
-
setBinaryStream
public void setBinaryStream(java.lang.String parameterName, java.io.InputStream x) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setBinaryStream
public void setBinaryStream(java.lang.String parameterName, java.io.InputStream x, long length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of bytes- Throws:
java.sql.SQLException- if this object is closed
-
setBlob
public void setBlob(java.lang.String parameterName, java.io.InputStream x) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setCharacterStream
public void setCharacterStream(java.lang.String parameterName, java.io.Reader x) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setCharacterStream
public void setCharacterStream(java.lang.String parameterName, java.io.Reader x, long length) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the valuelength- the maximum number of characters- Throws:
java.sql.SQLException- if this object is closed
-
setClob
public void setClob(java.lang.String parameterName, java.io.Reader x) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setNCharacterStream
public void setNCharacterStream(java.lang.String parameterName, java.io.Reader x) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setNClob
public void setNClob(java.lang.String parameterName, java.io.Reader x) throws java.sql.SQLExceptionSets 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 interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
setSQLXML
public void setSQLXML(java.lang.String parameterName, java.sql.SQLXML x) throws java.sql.SQLExceptionSets the value of a parameter as a SQLXML object.- Specified by:
setSQLXMLin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter namex- the value- Throws:
java.sql.SQLException- if this object is closed
-
getObject
public <T> T getObject(int parameterIndex, java.lang.Class<T> type) throws java.sql.SQLExceptionReturns the value of the specified column as a Java object of the specified type.- Specified by:
getObjectin interfacejava.sql.CallableStatement- Parameters:
parameterIndex- the parameter index (1, 2, ...)type- the class of the returned value- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getObject
public <T> T getObject(java.lang.String parameterName, java.lang.Class<T> type) throws java.sql.SQLExceptionReturns the value of the specified column as a Java object of the specified type.- Specified by:
getObjectin interfacejava.sql.CallableStatement- Parameters:
parameterName- the parameter nametype- the class of the returned value- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if this object is closed
-
getCheckedMetaData
private java.sql.ResultSetMetaData getCheckedMetaData() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
checkIndexBounds
private void checkIndexBounds(int parameterIndex)
-
registerOutParameter
private void registerOutParameter(int parameterIndex) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
checkRegistered
private void checkRegistered(int parameterIndex) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getIndexForName
private int getIndexForName(java.lang.String parameterName) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getOpenResultSet
private JdbcResultSet getOpenResultSet() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-