- All Implemented Interfaces:
AutoCloseable,CallableStatement,PreparedStatement,Statement,Wrapper,FirebirdCallableStatement,FirebirdPreparedStatement,FirebirdStatement
CallableStatement.
This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
For the public API, refer to the CallableStatement and FirebirdCallableStatement interfaces.
- Author:
- David Jencks, Roman Rokytskyy, Steven Jardine, Mark Rotteveel
-
Nested Class Summary
Nested classes/interfaces inherited from class org.firebirdsql.jdbc.FBStatement
FBStatement.StatementResult -
Field Summary
FieldsFields inherited from class org.firebirdsql.jdbc.FBPreparedStatement
METHOD_NOT_SUPPORTEDFields inherited from class org.firebirdsql.jdbc.FBStatement
currentStatementResult, fbStatement, gdsHelper, isSingletonResult, specialResult, statementListenerFields inherited from class org.firebirdsql.jdbc.AbstractStatement
connectionFields inherited from interface org.firebirdsql.jdbc.FirebirdPreparedStatement
TYPE_COMMIT, TYPE_DDL, TYPE_DELETE, TYPE_EXEC_PROCEDURE, TYPE_GET_SEGMENT, TYPE_INSERT, TYPE_PUT_SEGMENT, TYPE_ROLLBACK, TYPE_SAVEPOINT, TYPE_SELECT, TYPE_SELECT_FOR_UPDATE, TYPE_SET_GENERATOR, TYPE_START_TRANS, TYPE_UPDATEFields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFBCallableStatement(FBConnection connection, String sql, ResultSetBehavior rsBehavior, StoredProcedureMetaData storedProcMetaData, FBObjectListener.StatementListener statementListener, FBObjectListener.BlobListener blobListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch()protected ResultSetassertHasData(@Nullable ResultSet rs) Asserts if the current statement has data to return.voidvoidclose()protected FBResultSetcreateSpecialResultSet(@Nullable FBObjectListener.ResultSetListener resultSetListener) Create the result set forspecialResult.booleanexecute()intprotected ResultSetReturns the result set for the singleton row of the callable statement and asserts it has data.@Nullable ArraygetArray(int parameterIndex) @Nullable Array@Nullable BigDecimalgetBigDecimal(int parameterIndex) @Nullable BigDecimalgetBigDecimal(int parameterIndex, int scale) Deprecated.@Nullable BigDecimalgetBigDecimal(String colName) @Nullable BlobgetBlob(int parameterIndex) @Nullable BlobbooleangetBoolean(int parameterIndex) booleangetBoolean(String colName) bytegetByte(int parameterIndex) bytebyte @Nullable []getBytes(int parameterIndex) byte @Nullable []@Nullable ReadergetCharacterStream(int parameterIndex) @Nullable ReadergetCharacterStream(String parameterName) @Nullable ClobgetClob(int parameterIndex) @Nullable ClobgetDate(int parameterIndex) @Nullable Date@Nullable Date@Nullable DatedoublegetDouble(int parameterIndex) doublefloatgetFloat(int parameterIndex) floatintgetInt(int parameterIndex) intlonggetLong(int parameterIndex) long@Nullable ResultSetMetaData@Nullable ReadergetNCharacterStream(int parameterIndex) @Nullable ReadergetNCharacterStream(String parameterName) @Nullable NClobgetNClob(int parameterIndex) @Nullable NClob@Nullable StringgetNString(int parameterIndex) @Nullable StringgetNString(String parameterName) @Nullable ObjectgetObject(int parameterIndex) <T extends @Nullable Object>
@Nullable T@Nullable Object@Nullable Object<T extends @Nullable Object>
@Nullable T@Nullable Object@Nullable RefgetRef(int parameterIndex) @Nullable Ref@Nullable RowIdgetRowId(int parameterIndex) @Nullable RowIdshortgetShort(int parameterIndex) short@Nullable SQLXMLgetSQLXML(int parameterIndex) @Nullable SQLXML@Nullable StringgetString(int parameterIndex) @Nullable String@Nullable TimegetTime(int parameterIndex) @Nullable Time@Nullable Time@Nullable Time@Nullable TimestampgetTimestamp(int parameterIndex) @Nullable TimestampgetTimestamp(int parameterIndex, @Nullable Calendar cal) @Nullable TimestampgetTimestamp(String colName) @Nullable TimestampgetTimestamp(String colName, @Nullable Calendar cal) @Nullable URLgetURL(int parameterIndex) @Nullable URLprotected booleaninternalExecute(boolean sendOutParams) Execute this statement.booleanRetrieve if this callable statement has been marked as selectable.protected voidWe allow multiple calls to this method without re-preparing the statement.voidregisterOutParameter(int parameterIndex, int sqlType) voidregisterOutParameter(int parameterIndex, int sqlType, int scale) voidregisterOutParameter(int parameterIndex, int sqlType, String typeName) voidregisterOutParameter(int parameterIndex, SQLType sqlType) voidregisterOutParameter(int parameterIndex, SQLType sqlType, int scale) voidregisterOutParameter(int parameterIndex, SQLType sqlType, String typeName) voidregisterOutParameter(String param1, int param2) voidregisterOutParameter(String param1, int param2, int param3) voidregisterOutParameter(String param1, int param2, String param3) voidregisterOutParameter(String parameterName, SQLType sqlType) voidregisterOutParameter(String parameterName, SQLType sqlType, int scale) voidregisterOutParameter(String parameterName, SQLType sqlType, String typeName) voidsetAsciiStream(String parameterName, @Nullable InputStream x) voidsetAsciiStream(String param1, @Nullable InputStream param2, int param3) voidsetAsciiStream(String parameterName, @Nullable InputStream x, long length) voidsetBigDecimal(int parameterIndex, @Nullable BigDecimal x) voidsetBigDecimal(String param1, @Nullable BigDecimal param2) voidsetBinaryStream(int parameterIndex, @Nullable InputStream inputStream) voidsetBinaryStream(int parameterIndex, @Nullable InputStream inputStream, int length) voidsetBinaryStream(int parameterIndex, @Nullable InputStream inputStream, long length) voidsetBinaryStream(String parameterName, @Nullable InputStream x) voidsetBinaryStream(String param1, @Nullable InputStream param2, int param3) voidsetBinaryStream(String parameterName, @Nullable InputStream x, long length) voidsetBlob(int parameterIndex, @Nullable InputStream inputStream) voidsetBlob(int parameterIndex, @Nullable InputStream inputStream, long length) voidvoidsetBlob(String parameterName, @Nullable InputStream inputStream) voidsetBlob(String parameterName, @Nullable InputStream inputStream, long length) voidvoidsetBoolean(int parameterIndex, boolean x) voidsetBoolean(String param1, boolean param2) voidsetByte(int parameterIndex, byte x) voidvoidsetBytes(int parameterIndex, byte @Nullable [] x) voidvoidsetCharacterStream(int parameterIndex, @Nullable Reader reader) voidsetCharacterStream(int parameterIndex, @Nullable Reader reader, int length) voidsetCharacterStream(int parameterIndex, @Nullable Reader reader, long length) voidsetCharacterStream(String parameterName, @Nullable Reader reader) voidsetCharacterStream(String param1, @Nullable Reader param2, int param3) voidsetCharacterStream(String parameterName, @Nullable Reader reader, long length) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidsetDouble(int parameterIndex, double x) voidvoidsetFloat(int parameterIndex, float x) voidvoidsetInt(int parameterIndex, int x) voidvoidsetLong(int parameterIndex, long x) voidvoidsetNCharacterStream(String parameterName, @Nullable Reader value) voidsetNCharacterStream(String parameterName, @Nullable Reader value, long length) voidvoidvoidvoidsetNString(String parameterName, @Nullable String value) voidsetNull(int parameterIndex, int sqlType) voidvoidvoidvoidvoidvoidvoidvoidvoidprotected voidSet required types for output parameters.voidvoidsetSelectableProcedure(boolean selectableProcedure) Mark this callable statement as a call of the selectable procedure.voidsetShort(int parameterIndex, short x) voidvoidvoidvoidvoidvoidvoidvoidvoidsetTimestamp(int parameterIndex, @Nullable Timestamp x) voidsetTimestamp(int parameterIndex, @Nullable Timestamp x, @Nullable Calendar cal) voidsetTimestamp(String param1, @Nullable Timestamp param2) voidsetTimestamp(String param1, @Nullable Timestamp param2, @Nullable Calendar param3) voidbooleanwasNull()Methods inherited from class org.firebirdsql.jdbc.FBPreparedStatement
addBatch, clearParameters, completeStatement, execute, execute, execute, execute, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getField, getParameterDescriptor, getParameterMetaData, isGeneratedKeyQuery, notifyStatementCompleted, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setObject, setObject, setRef, setRowId, setSQLXML, setUnicodeStream, setURLMethods inherited from class org.firebirdsql.jdbc.FBStatement
cancel, createBatchUpdateException, createBatchUpdateException, createStatementListener, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeBatch, executeImpl, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getCurrentResultSet, getDeletedRowsCount, getExecutionPlan, getExplainedExecutionPlan, getInsertedRowsCount, getLargeUpdateCount, getLargeUpdateCountMinZero, getMaxFieldSize, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSet, getStatementHandle, getStatementType, getUpdateCount, getUpdateCountMinZero, getUpdatedRowsCount, hasOpenResultSet, internalExecute, internalExecute, isSimpleIdentifier, isValid, isWrapperFor, nativeSQL, notifyStatementCompleted, notifyStatementStarted, notifyStatementStarted, setEscapeProcessing, setMaxFieldSize, setQueryTimeout, unwrapMethods inherited from class org.firebirdsql.jdbc.AbstractStatement
addWarning, checkValidity, clearWarnings, closeOnCompletion, completeStatement, equals, fetchConfig, getConnection, getCursorName, getFetchDirection, getFetchSize, getLargeMaxRows, getLocalStatementId, getMaxRows, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, hashCode, isClosed, isCloseOnCompletion, isPoolable, performCloseOnCompletion, resultSetBehavior, setCursorName, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxRows, setPoolable, withLockMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.CallableStatement
setObject, setObjectMethods inherited from interface org.firebirdsql.jdbc.FirebirdPreparedStatement
getStatementTypeMethods inherited from interface org.firebirdsql.jdbc.FirebirdStatement
getCurrentResultSet, getDeletedRowsCount, getExecutionPlan, getExplainedExecutionPlan, getInsertedRowsCount, getLastExecutionPlan, getLastExplainedExecutionPlan, getLocalStatementId, getUpdatedRowsCount, hasOpenResultSet, isValidMethods inherited from interface java.sql.PreparedStatement
clearParameters, executeLargeUpdate, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setObject, setObject, setRef, setRowId, setSQLXML, setUnicodeStream, setURLMethods inherited from interface java.sql.Statement
addBatch, cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, 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
-
Field Details
-
selectableProcedure
protected boolean selectableProcedure -
procedureCall
-
-
Constructor Details
-
FBCallableStatement
protected FBCallableStatement(FBConnection connection, String sql, ResultSetBehavior rsBehavior, StoredProcedureMetaData storedProcMetaData, FBObjectListener.StatementListener statementListener, FBObjectListener.BlobListener blobListener) throws SQLException - Throws:
SQLException
-
-
Method Details
-
close
Description copied from class:AbstractStatementSubclasses overriding this method are expected to call this method with
super.close()at an appropriate point to mark it closed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Overrides:
closein classFBPreparedStatement- Throws:
SQLException
-
getFirebirdParameterMetaData
- Overrides:
getFirebirdParameterMetaDatain classFBPreparedStatement- Throws:
SQLException
-
addBatch
- Specified by:
addBatchin interfacePreparedStatement- Overrides:
addBatchin classFBPreparedStatement- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatchin interfaceStatement- Overrides:
clearBatchin classFBPreparedStatement- Throws:
SQLException
-
executeBatchInternal
- Overrides:
executeBatchInternalin classFBPreparedStatement- Throws:
SQLException
-
setSelectableProcedure
public void setSelectableProcedure(boolean selectableProcedure) Description copied from interface:FirebirdCallableStatementMark this callable statement as a call of the selectable procedure. By default, callable statement uses "EXECUTE PROCEDURE" SQL statement to invoke stored procedures that return single row of output parameters or a result set. In former case it retrieves only the first row of the result set.- Specified by:
setSelectableProcedurein interfaceFirebirdCallableStatement- Parameters:
selectableProcedure-trueif the called procedure is selectable.- See Also:
-
isSelectableProcedure
public boolean isSelectableProcedure()Description copied from interface:FirebirdCallableStatementRetrieve if this callable statement has been marked as selectable.Starting from Firebird 2.1, this value is set automatically from metadata stored in the database. Prior to Firebird 2.1, it must be set manually.
- Specified by:
isSelectableProcedurein interfaceFirebirdCallableStatement- Returns:
trueif the called procedure is selectable, false otherwise- See Also:
-
setRequiredTypes
Set required types for output parameters.- Throws:
SQLException- if something went wrong.
-
prepareFixedStatement
We allow multiple calls to this method without re-preparing the statement. This is a workaround to the issue that the statement is actually prepared only after all OUT parameters are registered.- Overrides:
prepareFixedStatementin classFBPreparedStatement- Throws:
SQLException
-
getMetaData
Since we deferred the statement preparation until all OUT params are registered, we ensure that the statement is prepared before the meta data for the callable statement is obtained.
- Specified by:
getMetaDatain interfacePreparedStatement- Overrides:
getMetaDatain classFBPreparedStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfacePreparedStatement- Overrides:
executein classFBPreparedStatement- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfacePreparedStatement- Overrides:
executeQueryin classFBPreparedStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfacePreparedStatement- Overrides:
executeUpdatein classFBPreparedStatement- Throws:
SQLException
-
internalExecute
Description copied from class:FBPreparedStatementExecute this statement. Method checks whether all parameters are set, flushes all "flushable" fields that might contain cached data and executes the statement.- Overrides:
internalExecutein classFBPreparedStatement- Parameters:
sendOutParams- Determines if the XSQLDA structure should be sent to the database- Returns:
trueif the statement has more result sets.- Throws:
SQLException
-
createSpecialResultSet
protected FBResultSet createSpecialResultSet(@Nullable FBObjectListener.ResultSetListener resultSetListener) throws SQLException Description copied from class:FBStatementCreate the result set forspecialResult.Should only be called from
FBStatement.getResultSet(boolean). This exists becauseFBCallableStatementneeds to create the result set in a slightly different way to account for the fact that the blobs were already cached earlier.- Overrides:
createSpecialResultSetin classFBStatement- Parameters:
resultSetListener- result set listener (can benull)- Returns:
- result set wrapping
specialResult - Throws:
SQLException
-
registerOutParameter
- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
Implementation note: This method will behave the same as calling
registerOutParameter(int, int).- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
Implementation note: behaves as
registerOutParameter(int, int)called withSQLType.getVendorTypeNumber().- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException Implementation note: behaves as
registerOutParameter(int, int, int)called withSQLType.getVendorTypeNumber().- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException Implementation note: behaves as
registerOutParameter(int, int, String)called withSQLType.getVendorTypeNumber().- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
wasNull
- Specified by:
wasNullin interfaceCallableStatement- Throws:
SQLException
-
getString
- Specified by:
getStringin interfaceCallableStatement- Throws:
SQLException
-
getBoolean
- Specified by:
getBooleanin interfaceCallableStatement- Throws:
SQLException
-
getByte
- Specified by:
getBytein interfaceCallableStatement- Throws:
SQLException
-
getShort
- Specified by:
getShortin interfaceCallableStatement- Throws:
SQLException
-
getInt
- Specified by:
getIntin interfaceCallableStatement- Throws:
SQLException
-
getLong
- Specified by:
getLongin interfaceCallableStatement- Throws:
SQLException
-
getFloat
- Specified by:
getFloatin interfaceCallableStatement- Throws:
SQLException
-
getDouble
- Specified by:
getDoublein interfaceCallableStatement- Throws:
SQLException
-
getBigDecimal
@Deprecated(since="1") public @Nullable BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException Deprecated.- Specified by:
getBigDecimalin interfaceCallableStatement- Throws:
SQLException
-
getBytes
- Specified by:
getBytesin interfaceCallableStatement- Throws:
SQLException
-
getDate
- Specified by:
getDatein interfaceCallableStatement- Throws:
SQLException
-
getTime
- Specified by:
getTimein interfaceCallableStatement- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestampin interfaceCallableStatement- Throws:
SQLException
-
getObject
Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.
- Specified by:
getObjectin interfaceCallableStatement- Throws:
SQLException
-
getObject
- Specified by:
getObjectin interfaceCallableStatement- Throws:
SQLException
-
getObject
Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.
- Specified by:
getObjectin interfaceCallableStatement- Throws:
SQLException
-
getObject
Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.
- Specified by:
getObjectin interfaceCallableStatement- Throws:
SQLException
-
getObject
public <T extends @Nullable Object> @Nullable T getObject(int parameterIndex, Class<T> type) throws SQLException - Specified by:
getObjectin interfaceCallableStatement- Throws:
SQLException
-
getObject
public <T extends @Nullable Object> @Nullable T getObject(String parameterName, Class<T> type) throws SQLException - Specified by:
getObjectin interfaceCallableStatement- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimalin interfaceCallableStatement- Throws:
SQLException
-
getRef
- Specified by:
getRefin interfaceCallableStatement- Throws:
SQLException
-
getBlob
- Specified by:
getBlobin interfaceCallableStatement- Throws:
SQLException
-
getClob
- Specified by:
getClobin interfaceCallableStatement- Throws:
SQLException
-
getArray
- Specified by:
getArrayin interfaceCallableStatement- Throws:
SQLException
-
getDate
- Specified by:
getDatein interfaceCallableStatement- Throws:
SQLException
-
getTime
- Specified by:
getTimein interfaceCallableStatement- Throws:
SQLException
-
getTimestamp
public @Nullable Timestamp getTimestamp(int parameterIndex, @Nullable Calendar cal) throws SQLException - Specified by:
getTimestampin interfaceCallableStatement- Throws:
SQLException
-
getURL
- Specified by:
getURLin interfaceCallableStatement- Throws:
SQLException
-
getString
- Specified by:
getStringin interfaceCallableStatement- Throws:
SQLException
-
getBoolean
- Specified by:
getBooleanin interfaceCallableStatement- Throws:
SQLException
-
getByte
- Specified by:
getBytein interfaceCallableStatement- Throws:
SQLException
-
getShort
- Specified by:
getShortin interfaceCallableStatement- Throws:
SQLException
-
getInt
- Specified by:
getIntin interfaceCallableStatement- Throws:
SQLException
-
getLong
- Specified by:
getLongin interfaceCallableStatement- Throws:
SQLException
-
getFloat
- Specified by:
getFloatin interfaceCallableStatement- Throws:
SQLException
-
getDouble
- Specified by:
getDoublein interfaceCallableStatement- Throws:
SQLException
-
getBytes
- Specified by:
getBytesin interfaceCallableStatement- Throws:
SQLException
-
getDate
- Specified by:
getDatein interfaceCallableStatement- Throws:
SQLException
-
getTime
- Specified by:
getTimein interfaceCallableStatement- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestampin interfaceCallableStatement- Throws:
SQLException
-
getBigDecimal
- Specified by:
getBigDecimalin interfaceCallableStatement- Throws:
SQLException
-
getRef
- Specified by:
getRefin interfaceCallableStatement- Throws:
SQLException
-
getBlob
- Specified by:
getBlobin interfaceCallableStatement- Throws:
SQLException
-
getClob
- Specified by:
getClobin interfaceCallableStatement- Throws:
SQLException
-
getArray
- Specified by:
getArrayin interfaceCallableStatement- Throws:
SQLException
-
getDate
- Specified by:
getDatein interfaceCallableStatement- Throws:
SQLException
-
getTime
- Specified by:
getTimein interfaceCallableStatement- Throws:
SQLException
-
getTimestamp
- Specified by:
getTimestampin interfaceCallableStatement- Throws:
SQLException
-
getURL
- Specified by:
getURLin interfaceCallableStatement- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
getNCharacterStream
Implementation note: This method behaves exactly the same as
getCharacterStream(int).- Specified by:
getNCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
getNCharacterStream
Implementation note: This method behaves exactly the same as
getCharacterStream(String).- Specified by:
getNCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
getNString
Implementation note: This method behaves exactly the same as
getString(int).- Specified by:
getNStringin interfaceCallableStatement- Throws:
SQLException
-
getNString
Implementation note: This method behaves exactly the same as
getString(String).- Specified by:
getNStringin interfaceCallableStatement- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(String parameterName, @Nullable InputStream x, long length) throws SQLException - Specified by:
setAsciiStreamin interfaceCallableStatement- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfaceCallableStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(String parameterName, @Nullable InputStream x, long length) throws SQLException - Specified by:
setBinaryStreamin interfaceCallableStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfaceCallableStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfaceCallableStatement- Throws:
SQLException
-
setBlob
public void setBlob(String parameterName, @Nullable InputStream inputStream, long length) throws SQLException - Specified by:
setBlobin interfaceCallableStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfaceCallableStatement- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(String parameterName, @Nullable Reader reader, long length) throws SQLException - Specified by:
setCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfaceCallableStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfaceCallableStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfaceCallableStatement- Throws:
SQLException
-
setNCharacterStream
public void setNCharacterStream(String parameterName, @Nullable Reader value, long length) throws SQLException Implementation note: This method behaves exactly the same as
setCharacterStream(String, Reader, long).- Specified by:
setNCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
setNCharacterStream
Implementation note: This method behaves exactly the same as
setCharacterStream(String, Reader).- Specified by:
setNCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
setNClob
public void setNClob(String parameterName, @Nullable Reader reader, long length) throws SQLException Implementation note: This method behaves exactly the same as
setClob(String, Reader, long).- Specified by:
setNClobin interfaceCallableStatement- Throws:
SQLException
-
setNClob
Implementation note: This method behaves exactly the same as
setClob(String, Reader).- Specified by:
setNClobin interfaceCallableStatement- Throws:
SQLException
-
setNString
Implementation note: This method behaves exactly the same as
setString(String, String).- Specified by:
setNStringin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
Implementation note: behaves as
registerOutParameter(String, int)called withSQLType.getVendorTypeNumber().- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException Implementation note: behaves as
registerOutParameter(String, int, int)called withSQLType.getVendorTypeNumber().- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException Implementation note: behaves as
registerOutParameter(String, int, String)called withSQLType.getVendorTypeNumber().- Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
setURL
- Specified by:
setURLin interfaceCallableStatement- Throws:
SQLException
-
setNull
- Specified by:
setNullin interfaceCallableStatement- Throws:
SQLException
-
setBoolean
- Specified by:
setBooleanin interfaceCallableStatement- Throws:
SQLException
-
setByte
- Specified by:
setBytein interfaceCallableStatement- Throws:
SQLException
-
setShort
- Specified by:
setShortin interfaceCallableStatement- Throws:
SQLException
-
setInt
- Specified by:
setIntin interfaceCallableStatement- Throws:
SQLException
-
setLong
- Specified by:
setLongin interfaceCallableStatement- Throws:
SQLException
-
setFloat
- Specified by:
setFloatin interfaceCallableStatement- Throws:
SQLException
-
setDouble
- Specified by:
setDoublein interfaceCallableStatement- Throws:
SQLException
-
setBigDecimal
- Specified by:
setBigDecimalin interfaceCallableStatement- Throws:
SQLException
-
setString
- Specified by:
setStringin interfaceCallableStatement- Throws:
SQLException
-
setBytes
- Specified by:
setBytesin interfaceCallableStatement- Throws:
SQLException
-
setDate
- Specified by:
setDatein interfaceCallableStatement- Throws:
SQLException
-
setTime
- Specified by:
setTimein interfaceCallableStatement- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestampin interfaceCallableStatement- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(String param1, @Nullable InputStream param2, int param3) throws SQLException - Specified by:
setAsciiStreamin interfaceCallableStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(String param1, @Nullable InputStream param2, int param3) throws SQLException - Specified by:
setBinaryStreamin interfaceCallableStatement- Throws:
SQLException
-
setObject
public void setObject(String param1, @Nullable Object param2, int param3, int param4) throws SQLException - Specified by:
setObjectin interfaceCallableStatement- Throws:
SQLException
-
setObject
- Specified by:
setObjectin interfaceCallableStatement- Throws:
SQLException
-
setObject
- Specified by:
setObjectin interfaceCallableStatement- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(String param1, @Nullable Reader param2, int param3) throws SQLException - Specified by:
setCharacterStreamin interfaceCallableStatement- Throws:
SQLException
-
setDate
public void setDate(String param1, @Nullable Date param2, @Nullable Calendar param3) throws SQLException - Specified by:
setDatein interfaceCallableStatement- Throws:
SQLException
-
setTime
public void setTime(String param1, @Nullable Time param2, @Nullable Calendar param3) throws SQLException - Specified by:
setTimein interfaceCallableStatement- Throws:
SQLException
-
setTimestamp
public void setTimestamp(String param1, @Nullable Timestamp param2, @Nullable Calendar param3) throws SQLException - Specified by:
setTimestampin interfaceCallableStatement- Throws:
SQLException
-
setNull
- Specified by:
setNullin interfaceCallableStatement- Throws:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException - Specified by:
registerOutParameterin interfaceCallableStatement- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeysin interfaceStatement- Overrides:
getGeneratedKeysin classFBStatement- Throws:
SQLException
-
assertHasData
Asserts if the current statement has data to return. It checks if the result set has a row with data.- Parameters:
rs- result set to test- Returns:
- non-
nullresult set (same object asrs) - Throws:
SQLException- when the result set has no data.
-
getAndAssertSingletonResultSet
Returns the result set for the singleton row of the callable statement and asserts it has data. If this is a selectable procedure, or there is no singleton row, it will return the normal result set.This should fix the problem described in JDBC-350 in most circumstances.
- Returns:
- Either the singleton result set, or the current result set as described above
- Throws:
SQLException- For database access errors
-
setBigDecimal
- Specified by:
setBigDecimalin interfacePreparedStatement- Overrides:
setBigDecimalin classFBPreparedStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, @Nullable InputStream inputStream, int length) throws SQLException - Specified by:
setBinaryStreamin interfacePreparedStatement- Overrides:
setBinaryStreamin classFBPreparedStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, @Nullable InputStream inputStream, long length) throws SQLException - Specified by:
setBinaryStreamin interfacePreparedStatement- Overrides:
setBinaryStreamin classFBPreparedStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, @Nullable InputStream inputStream) throws SQLException - Specified by:
setBinaryStreamin interfacePreparedStatement- Overrides:
setBinaryStreamin classFBPreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Overrides:
setBlobin classFBPreparedStatement- Throws:
SQLException
-
setBlob
public void setBlob(int parameterIndex, @Nullable InputStream inputStream, long length) throws SQLException - Specified by:
setBlobin interfacePreparedStatement- Overrides:
setBlobin classFBPreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Overrides:
setBlobin classFBPreparedStatement- Throws:
SQLException
-
setBoolean
- Specified by:
setBooleanin interfacePreparedStatement- Overrides:
setBooleanin classFBPreparedStatement- Throws:
SQLException
-
setByte
- Specified by:
setBytein interfacePreparedStatement- Overrides:
setBytein classFBPreparedStatement- Throws:
SQLException
-
setBytes
- Specified by:
setBytesin interfacePreparedStatement- Overrides:
setBytesin classFBPreparedStatement- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, @Nullable Reader reader, int length) throws SQLException - Specified by:
setCharacterStreamin interfacePreparedStatement- Overrides:
setCharacterStreamin classFBPreparedStatement- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, @Nullable Reader reader, long length) throws SQLException - Specified by:
setCharacterStreamin interfacePreparedStatement- Overrides:
setCharacterStreamin classFBPreparedStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Overrides:
setCharacterStreamin classFBPreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Overrides:
setClobin classFBPreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Overrides:
setClobin classFBPreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Overrides:
setClobin classFBPreparedStatement- Throws:
SQLException
-
setDate
public void setDate(int parameterIndex, @Nullable Date x, @Nullable Calendar cal) throws SQLException - Specified by:
setDatein interfacePreparedStatement- Overrides:
setDatein classFBPreparedStatement- Throws:
SQLException
-
setDate
- Specified by:
setDatein interfacePreparedStatement- Overrides:
setDatein classFBPreparedStatement- Throws:
SQLException
-
setDouble
- Specified by:
setDoublein interfacePreparedStatement- Overrides:
setDoublein classFBPreparedStatement- Throws:
SQLException
-
setFloat
- Specified by:
setFloatin interfacePreparedStatement- Overrides:
setFloatin classFBPreparedStatement- Throws:
SQLException
-
setInt
- Specified by:
setIntin interfacePreparedStatement- Overrides:
setIntin classFBPreparedStatement- Throws:
SQLException
-
setLong
- Specified by:
setLongin interfacePreparedStatement- Overrides:
setLongin classFBPreparedStatement- Throws:
SQLException
-
setNull
- Specified by:
setNullin interfacePreparedStatement- Overrides:
setNullin classFBPreparedStatement- Throws:
SQLException
-
setNull
- Specified by:
setNullin interfacePreparedStatement- Overrides:
setNullin classFBPreparedStatement- Throws:
SQLException
-
setObject
public void setObject(int parameterIndex, @Nullable Object x, int targetSqlType, int scaleOrLength) throws SQLException Implementation note: ignores
scaleOrLengthandtargetSqlTypeand works asFBPreparedStatement.setObject(int, Object),scaleOrLengthis not ignored ifxis aReaderorInputStream.Implementation note: ignores
scaleOrLengthandtargetSqlTypeand works assetObject(int, Object),scaleOrLengthis not ignored ifxis aReaderorInputStream.- Specified by:
setObjectin interfacePreparedStatement- Overrides:
setObjectin classFBPreparedStatement- Throws:
SQLException
-
setObject
public void setObject(int parameterIndex, @Nullable Object x, int targetSqlType) throws SQLException Description copied from class:FBPreparedStatementImplementation note: ignores
targetSqlTypeand works asFBPreparedStatement.setObject(int, Object).- Specified by:
setObjectin interfacePreparedStatement- Overrides:
setObjectin classFBPreparedStatement- Throws:
SQLException
-
setObject
- Specified by:
setObjectin interfacePreparedStatement- Overrides:
setObjectin classFBPreparedStatement- Throws:
SQLException
-
setShort
- Specified by:
setShortin interfacePreparedStatement- Overrides:
setShortin classFBPreparedStatement- Throws:
SQLException
-
setString
- Specified by:
setStringin interfacePreparedStatement- Overrides:
setStringin classFBPreparedStatement- Throws:
SQLException
-
setTime
public void setTime(int parameterIndex, @Nullable Time x, @Nullable Calendar cal) throws SQLException - Specified by:
setTimein interfacePreparedStatement- Overrides:
setTimein classFBPreparedStatement- Throws:
SQLException
-
setTime
- Specified by:
setTimein interfacePreparedStatement- Overrides:
setTimein classFBPreparedStatement- Throws:
SQLException
-
setTimestamp
public void setTimestamp(int parameterIndex, @Nullable Timestamp x, @Nullable Calendar cal) throws SQLException - Specified by:
setTimestampin interfacePreparedStatement- Overrides:
setTimestampin classFBPreparedStatement- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestampin interfacePreparedStatement- Overrides:
setTimestampin classFBPreparedStatement- Throws:
SQLException
-
getNClob
Implementation note: This method behaves exactly the same as
getClob(int).- Specified by:
getNClobin interfaceCallableStatement- Throws:
SQLException
-
getNClob
Implementation note: This method behaves exactly the same as
getClob(String).- Specified by:
getNClobin interfaceCallableStatement- Throws:
SQLException
-
getRowId
- Specified by:
getRowIdin interfaceCallableStatement- Throws:
SQLException
-
getRowId
- Specified by:
getRowIdin interfaceCallableStatement- Throws:
SQLException
-
getSQLXML
- Specified by:
getSQLXMLin interfaceCallableStatement- Throws:
SQLException
-
getSQLXML
- Specified by:
getSQLXMLin interfaceCallableStatement- Throws:
SQLException
-
setNClob
Implementation note: This method behaves exactly the same as
setClob(String, Clob).- Specified by:
setNClobin interfaceCallableStatement- Throws:
SQLException
-
setRowId
- Specified by:
setRowIdin interfaceCallableStatement- Throws:
SQLException
-
setSQLXML
- Specified by:
setSQLXMLin interfaceCallableStatement- Throws:
SQLException
-