Package org.apache.tomcat.dbcp.dbcp2
Class DelegatingCallableStatement
java.lang.Object
org.apache.tomcat.dbcp.dbcp2.AbandonedTrace
org.apache.tomcat.dbcp.dbcp2.DelegatingStatement
org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement
org.apache.tomcat.dbcp.dbcp2.DelegatingCallableStatement
- All Implemented Interfaces:
- AutoCloseable,- CallableStatement,- PreparedStatement,- Statement,- Wrapper,- TrackedUse
- Direct Known Subclasses:
- PoolableCallableStatement
public class DelegatingCallableStatement
extends DelegatingPreparedStatement
implements CallableStatement
A base delegating implementation of 
CallableStatement.
 
 All of the methods from the CallableStatement interface simply call the corresponding method on the
 "delegate" provided in my constructor.
 
Extends AbandonedTrace to implement Statement tracking and logging of code which created the Statement. Tracking the Statement ensures that the Connection which created it can close any open Statement's on Connection close.
- Since:
- 2.0
- 
Field SummaryFields inherited from interface java.sql.StatementCLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
- 
Constructor SummaryConstructorsConstructorDescriptionDelegatingCallableStatement(DelegatingConnection<?> connection, CallableStatement statement) Creates a wrapper for the Statement which traces this Statement to the Connection which created it and the code which created it.
- 
Method SummaryModifier and TypeMethodDescriptiongetArray(int parameterIndex) getBigDecimal(int parameterIndex) getBigDecimal(int parameterIndex, int scale) Deprecated.getBigDecimal(String parameterName) getBlob(int parameterIndex) booleangetBoolean(int parameterIndex) booleangetBoolean(String parameterName) bytegetByte(int parameterIndex) bytebyte[]getBytes(int parameterIndex) byte[]getCharacterStream(int parameterIndex) getCharacterStream(String parameterName) getClob(int parameterIndex) getDate(int parameterIndex) doublegetDouble(int parameterIndex) doublefloatgetFloat(int parameterIndex) floatintgetInt(int parameterIndex) intlonggetLong(int parameterIndex) longgetNCharacterStream(int parameterIndex) getNCharacterStream(String parameterName) getNClob(int parameterIndex) getNString(int parameterIndex) getNString(String parameterName) getObject(int parameterIndex) <T> T<T> TgetRef(int parameterIndex) getRowId(int parameterIndex) shortgetShort(int parameterIndex) shortgetSQLXML(int parameterIndex) getString(int parameterIndex) getTime(int parameterIndex) getTimestamp(int parameterIndex) getTimestamp(int parameterIndex, Calendar cal) getTimestamp(String parameterName) getTimestamp(String parameterName, Calendar cal) getURL(int parameterIndex) voidregisterOutParameter(int parameterIndex, int sqlType) voidregisterOutParameter(int parameterIndex, int sqlType, int scale) voidregisterOutParameter(int paramIndex, 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 parameterName, int sqlType) voidregisterOutParameter(String parameterName, int sqlType, int scale) voidregisterOutParameter(String parameterName, int sqlType, String typeName) voidregisterOutParameter(String parameterName, SQLType sqlType) voidregisterOutParameter(String parameterName, SQLType sqlType, int scale) voidregisterOutParameter(String parameterName, SQLType sqlType, String typeName) voidsetAsciiStream(String parameterName, InputStream inputStream) voidsetAsciiStream(String parameterName, InputStream x, int length) voidsetAsciiStream(String parameterName, InputStream inputStream, long length) voidsetBigDecimal(String parameterName, BigDecimal x) voidsetBinaryStream(String parameterName, InputStream inputStream) voidsetBinaryStream(String parameterName, InputStream x, int length) voidsetBinaryStream(String parameterName, InputStream inputStream, long length) voidsetBlob(String parameterName, InputStream inputStream) voidsetBlob(String parameterName, InputStream inputStream, long length) voidvoidsetBoolean(String parameterName, boolean x) voidvoidvoidsetCharacterStream(String parameterName, Reader reader) voidsetCharacterStream(String parameterName, Reader reader, int length) voidsetCharacterStream(String parameterName, Reader reader, long length) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidsetNCharacterStream(String parameterName, Reader reader) voidsetNCharacterStream(String parameterName, Reader reader, long length) voidvoidvoidvoidsetNString(String parameterName, String value) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidsetTimestamp(String parameterName, Timestamp x) voidsetTimestamp(String parameterName, Timestamp x, Calendar cal) voidbooleanwasNull()Methods inherited from class org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatementaddBatch, clearParameters, execute, executeLargeUpdate, executeQuery, executeUpdate, getMetaData, getParameterMetaData, prepareToReturn, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, toStringMethods inherited from class org.apache.tomcat.dbcp.dbcp2.DelegatingStatementactivate, addBatch, cancel, checkOpen, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finalize, getConnection, getConnectionInternal, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getInnermostDelegate, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, handleException, isClosed, isClosedInternal, isCloseOnCompletion, isPoolable, isWrapperFor, passivate, setClosedInternal, setCursorName, setDelegate, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrapMethods inherited from class org.apache.tomcat.dbcp.dbcp2.AbandonedTraceaddTrace, clearTrace, close, getLastUsed, getLastUsedInstant, getTrace, removeThisTrace, removeTrace, setLastUsed, setLastUsed, setLastUsedMethods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.sql.PreparedStatementaddBatch, clearParameters, execute, executeLargeUpdate, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURLMethods inherited from interface java.sql.StatementaddBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutMethods inherited from interface java.sql.WrapperisWrapperFor, unwrap
- 
Constructor Details- 
DelegatingCallableStatementCreates a wrapper for the Statement which traces this Statement to the Connection which created it and the code which created it.- Parameters:
- connection- the- DelegatingConnectionthat created this statement
- statement- the- CallableStatementto delegate all calls to
 
 
- 
- 
Method Details- 
getArray- Specified by:
- getArrayin interface- CallableStatement
- Throws:
- SQLException
 
- 
getArray- Specified by:
- getArrayin interface- CallableStatement
- Throws:
- SQLException
 
- 
getBigDecimal- Specified by:
- getBigDecimalin interface- CallableStatement
- Throws:
- SQLException
 
- 
getBigDecimalDeprecated.- Specified by:
- getBigDecimalin interface- CallableStatement
- Throws:
- SQLException
 
- 
getBigDecimal- Specified by:
- getBigDecimalin interface- CallableStatement
- Throws:
- SQLException
 
- 
getBlob- Specified by:
- getBlobin interface- CallableStatement
- Throws:
- SQLException
 
- 
getBlob- Specified by:
- getBlobin interface- CallableStatement
- Throws:
- SQLException
 
- 
getBoolean- Specified by:
- getBooleanin interface- CallableStatement
- Throws:
- SQLException
 
- 
getBoolean- Specified by:
- getBooleanin interface- CallableStatement
- Throws:
- SQLException
 
- 
getByte- Specified by:
- getBytein interface- CallableStatement
- Throws:
- SQLException
 
- 
getByte- Specified by:
- getBytein interface- CallableStatement
- Throws:
- SQLException
 
- 
getBytes- Specified by:
- getBytesin interface- CallableStatement
- Throws:
- SQLException
 
- 
getBytes- Specified by:
- getBytesin interface- CallableStatement
- Throws:
- SQLException
 
- 
getCharacterStream- Specified by:
- getCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
getCharacterStream- Specified by:
- getCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
getClob- Specified by:
- getClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
getClob- Specified by:
- getClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
getDate- Specified by:
- getDatein interface- CallableStatement
- Throws:
- SQLException
 
- 
getDate- Specified by:
- getDatein interface- CallableStatement
- Throws:
- SQLException
 
- 
getDate- Specified by:
- getDatein interface- CallableStatement
- Throws:
- SQLException
 
- 
getDate- Specified by:
- getDatein interface- CallableStatement
- Throws:
- SQLException
 
- 
getDouble- Specified by:
- getDoublein interface- CallableStatement
- Throws:
- SQLException
 
- 
getDouble- Specified by:
- getDoublein interface- CallableStatement
- Throws:
- SQLException
 
- 
getFloat- Specified by:
- getFloatin interface- CallableStatement
- Throws:
- SQLException
 
- 
getFloat- Specified by:
- getFloatin interface- CallableStatement
- Throws:
- SQLException
 
- 
getInt- Specified by:
- getIntin interface- CallableStatement
- Throws:
- SQLException
 
- 
getInt- Specified by:
- getIntin interface- CallableStatement
- Throws:
- SQLException
 
- 
getLong- Specified by:
- getLongin interface- CallableStatement
- Throws:
- SQLException
 
- 
getLong- Specified by:
- getLongin interface- CallableStatement
- Throws:
- SQLException
 
- 
getNCharacterStream- Specified by:
- getNCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
getNCharacterStream- Specified by:
- getNCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
getNClob- Specified by:
- getNClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
getNClob- Specified by:
- getNClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
getNString- Specified by:
- getNStringin interface- CallableStatement
- Throws:
- SQLException
 
- 
getNString- Specified by:
- getNStringin interface- CallableStatement
- Throws:
- SQLException
 
- 
getObject- Specified by:
- getObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
getObject- Specified by:
- getObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
getObject- Specified by:
- getObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
getObject- Specified by:
- getObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
getObject- Specified by:
- getObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
getObject- Specified by:
- getObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
getRef- Specified by:
- getRefin interface- CallableStatement
- Throws:
- SQLException
 
- 
getRef- Specified by:
- getRefin interface- CallableStatement
- Throws:
- SQLException
 
- 
getRowId- Specified by:
- getRowIdin interface- CallableStatement
- Throws:
- SQLException
 
- 
getRowId- Specified by:
- getRowIdin interface- CallableStatement
- Throws:
- SQLException
 
- 
getShort- Specified by:
- getShortin interface- CallableStatement
- Throws:
- SQLException
 
- 
getShort- Specified by:
- getShortin interface- CallableStatement
- Throws:
- SQLException
 
- 
getSQLXML- Specified by:
- getSQLXMLin interface- CallableStatement
- Throws:
- SQLException
 
- 
getSQLXML- Specified by:
- getSQLXMLin interface- CallableStatement
- Throws:
- SQLException
 
- 
getString- Specified by:
- getStringin interface- CallableStatement
- Throws:
- SQLException
 
- 
getString- Specified by:
- getStringin interface- CallableStatement
- Throws:
- SQLException
 
- 
getTime- Specified by:
- getTimein interface- CallableStatement
- Throws:
- SQLException
 
- 
getTime- Specified by:
- getTimein interface- CallableStatement
- Throws:
- SQLException
 
- 
getTime- Specified by:
- getTimein interface- CallableStatement
- Throws:
- SQLException
 
- 
getTime- Specified by:
- getTimein interface- CallableStatement
- Throws:
- SQLException
 
- 
getTimestamp- Specified by:
- getTimestampin interface- CallableStatement
- Throws:
- SQLException
 
- 
getTimestamp- Specified by:
- getTimestampin interface- CallableStatement
- Throws:
- SQLException
 
- 
getTimestamp- Specified by:
- getTimestampin interface- CallableStatement
- Throws:
- SQLException
 
- 
getTimestamp- Specified by:
- getTimestampin interface- CallableStatement
- Throws:
- SQLException
 
- 
getURL- Specified by:
- getURLin interface- CallableStatement
- Throws:
- SQLException
 
- 
getURL- Specified by:
- getURLin interface- CallableStatement
- Throws:
- SQLException
 
- 
registerOutParameter- Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
 
- 
registerOutParameter- Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
 
- 
registerOutParameter- Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
 
- 
registerOutParameter- Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
- Since:
- 2.5.0
 
- 
registerOutParameterpublic void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException - Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
- Since:
- 2.5.0
 
- 
registerOutParameterpublic void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException - Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
- Since:
- 2.5.0
 
- 
registerOutParameter- Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
 
- 
registerOutParameter- Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
 
- 
registerOutParameterpublic void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException - Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
 
- 
registerOutParameter- Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
- Since:
- 2.5.0
 
- 
registerOutParameterpublic void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException - Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
- Since:
- 2.5.0
 
- 
registerOutParameterpublic void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException - Specified by:
- registerOutParameterin interface- CallableStatement
- Throws:
- SQLException
- Since:
- 2.5.0
 
- 
setAsciiStream- Specified by:
- setAsciiStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setAsciiStream- Specified by:
- setAsciiStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setAsciiStreampublic void setAsciiStream(String parameterName, InputStream inputStream, long length) throws SQLException - Specified by:
- setAsciiStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setBigDecimal- Specified by:
- setBigDecimalin interface- CallableStatement
- Throws:
- SQLException
 
- 
setBinaryStream- Specified by:
- setBinaryStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setBinaryStream- Specified by:
- setBinaryStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setBinaryStreampublic void setBinaryStream(String parameterName, InputStream inputStream, long length) throws SQLException - Specified by:
- setBinaryStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setBlob- Specified by:
- setBlobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setBlob- Specified by:
- setBlobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setBlob- Specified by:
- setBlobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setBoolean- Specified by:
- setBooleanin interface- CallableStatement
- Throws:
- SQLException
 
- 
setByte- Specified by:
- setBytein interface- CallableStatement
- Throws:
- SQLException
 
- 
setBytes- Specified by:
- setBytesin interface- CallableStatement
- Throws:
- SQLException
 
- 
setCharacterStream- Specified by:
- setCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setCharacterStream- Specified by:
- setCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setCharacterStreampublic void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException - Specified by:
- setCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setClob- Specified by:
- setClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setClob- Specified by:
- setClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setClob- Specified by:
- setClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setDate- Specified by:
- setDatein interface- CallableStatement
- Throws:
- SQLException
 
- 
setDate- Specified by:
- setDatein interface- CallableStatement
- Throws:
- SQLException
 
- 
setDouble- Specified by:
- setDoublein interface- CallableStatement
- Throws:
- SQLException
 
- 
setFloat- Specified by:
- setFloatin interface- CallableStatement
- Throws:
- SQLException
 
- 
setInt- Specified by:
- setIntin interface- CallableStatement
- Throws:
- SQLException
 
- 
setLong- Specified by:
- setLongin interface- CallableStatement
- Throws:
- SQLException
 
- 
setNCharacterStream- Specified by:
- setNCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setNCharacterStreampublic void setNCharacterStream(String parameterName, Reader reader, long length) throws SQLException - Specified by:
- setNCharacterStreamin interface- CallableStatement
- Throws:
- SQLException
 
- 
setNClob- Specified by:
- setNClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setNClob- Specified by:
- setNClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setNClob- Specified by:
- setNClobin interface- CallableStatement
- Throws:
- SQLException
 
- 
setNString- Specified by:
- setNStringin interface- CallableStatement
- Throws:
- SQLException
 
- 
setNull- Specified by:
- setNullin interface- CallableStatement
- Throws:
- SQLException
 
- 
setNull- Specified by:
- setNullin interface- CallableStatement
- Throws:
- SQLException
 
- 
setObject- Specified by:
- setObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
setObject- Specified by:
- setObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
setObjectpublic void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException - Specified by:
- setObjectin interface- CallableStatement
- Throws:
- SQLException
 
- 
setObject- Specified by:
- setObjectin interface- CallableStatement
- Throws:
- SQLException
- Since:
- 2.5.0
 
- 
setObjectpublic void setObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException - Specified by:
- setObjectin interface- CallableStatement
- Throws:
- SQLException
- Since:
- 2.5.0
 
- 
setRowId- Specified by:
- setRowIdin interface- CallableStatement
- Throws:
- SQLException
 
- 
setShort- Specified by:
- setShortin interface- CallableStatement
- Throws:
- SQLException
 
- 
setSQLXML- Specified by:
- setSQLXMLin interface- CallableStatement
- Throws:
- SQLException
 
- 
setString- Specified by:
- setStringin interface- CallableStatement
- Throws:
- SQLException
 
- 
setTime- Specified by:
- setTimein interface- CallableStatement
- Throws:
- SQLException
 
- 
setTime- Specified by:
- setTimein interface- CallableStatement
- Throws:
- SQLException
 
- 
setTimestamp- Specified by:
- setTimestampin interface- CallableStatement
- Throws:
- SQLException
 
- 
setTimestamp- Specified by:
- setTimestampin interface- CallableStatement
- Throws:
- SQLException
 
- 
setURL- Specified by:
- setURLin interface- CallableStatement
- Throws:
- SQLException
 
- 
wasNull- Specified by:
- wasNullin interface- CallableStatement
- Throws:
- SQLException
 
 
- 
getBigDecimal(int)orgetBigDecimal(String)