Package org.apache.openjpa.lib.jdbc
Class LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement
- java.lang.Object
-
- org.apache.openjpa.lib.jdbc.DelegatingCallableStatement
-
- org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement
-
- All Implemented Interfaces:
AutoCloseable,CallableStatement,PreparedStatement,Statement,Wrapper,Closeable
- Enclosing class:
- LoggingConnectionDecorator.LoggingConnection
protected class LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement extends DelegatingCallableStatement
CallableStatement decorated with logging. Similar toLoggingConnectionDecorator.LoggingConnection.LoggingPreparedStatementbut can not be extended due to the existing delegation hierarchy.
-
-
Field Summary
-
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
-
-
Constructor Summary
Constructors Constructor Description LoggingCallableStatement(CallableStatement stmt, String sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddBatch()protected voidappendInfo(StringBuffer buf)voidcancel()protected voidclearLogParameters(boolean batch)voidclearParameters()booleanexecute()booleanexecute(String sql)booleanexecute(String s, int i)booleanexecute(String s, int[] ia)booleanexecute(String s, String[] sa)int[]executeBatch()protected ResultSetexecuteQuery(boolean wrap)Execute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.protected ResultSetexecuteQuery(String sql, boolean wrap)Execute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.intexecuteUpdate()intexecuteUpdate(String sql)intexecuteUpdate(String s, int i)intexecuteUpdate(String s, int[] ia)intexecuteUpdate(String s, String[] sa)ResultSetMetaDatagetMetaData()voidsetArray(int i, Array a)voidsetAsciiStream(int i1, InputStream is, int i2)voidsetBigDecimal(int i, BigDecimal bd)voidsetBinaryStream(int i1, InputStream is, int i2)voidsetBlob(int i, Blob b)voidsetBoolean(int i, boolean b)voidsetByte(int i, byte b)voidsetBytes(int i, byte[] b)voidsetCharacterStream(int i1, Reader r, int i2)voidsetClob(int i, Clob c)voidsetDate(int i, Date d)voidsetDate(int i, Date d, Calendar c)voidsetDouble(int i, double d)voidsetFloat(int i, float f)voidsetInt(int i1, int i2)voidsetLong(int i, long l)voidsetNull(int i1, int i2)voidsetNull(int i1, int i2, String s)voidsetObject(int i, Object o)voidsetObject(int i1, Object o, int i2)voidsetObject(int i1, Object o, int i2, int i3)voidsetRef(int i, Ref r)voidsetShort(int i, short s)voidsetString(int i, String s)voidsetTime(int i, Time t)voidsetTime(int i, Time t, Calendar c)voidsetTimestamp(int i, Timestamp t)voidsetTimestamp(int i, Timestamp t, Calendar c)voidsetUnicodeStream(int i1, InputStream is, int i2)Deprecated.voidsetURL(int i, URL u)protected ResultSetwrapResult(ResultSet rs, boolean wrap)-
Methods inherited from class org.apache.openjpa.lib.jdbc.DelegatingCallableStatement
addBatch, clearBatch, clearWarnings, close, closeOnCompletion, equals, executeQuery, executeQuery, getArray, getArray, getBigDecimal, getBigDecimal, getBigDecimal, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConnection, getDate, getDate, getDate, getDate, getDelegate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getGeneratedKeys, getInnermostDelegate, getInt, getInt, getLong, getLong, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getParameterMetaData, getQueryTimeout, getRef, getRef, getResultSet, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getUpdateCount, getURL, getURL, getWarnings, hashCode, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setAsciiStream, setAsciiStream, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setClob, setClob, setCursorName, setDate, setDate, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNClob, setNClob, setNClob, setNString, setNString, setNull, setNull, setObject, setObject, setObject, setPoolable, setQueryTimeout, setRowId, setRowId, setShort, setSQLXML, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, toString, unwrap, wasNull, wrapResult
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.sql.CallableStatement
registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setObject, setObject
-
Methods inherited from interface java.sql.PreparedStatement
executeLargeUpdate, setObject, setObject
-
Methods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
-
-
-
-
Constructor Detail
-
LoggingCallableStatement
public LoggingCallableStatement(CallableStatement stmt, String sql) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
executeQuery
protected ResultSet executeQuery(String sql, boolean wrap) throws SQLException
Description copied from class:DelegatingCallableStatementExecute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Overrides:
executeQueryin classDelegatingCallableStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingCallableStatement- Throws:
SQLException
-
execute
public boolean execute(String sql) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingCallableStatement- Throws:
SQLException
-
executeQuery
protected ResultSet executeQuery(boolean wrap) throws SQLException
Description copied from class:DelegatingCallableStatementExecute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Overrides:
executeQueryin classDelegatingCallableStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate() throws SQLException- Specified by:
executeUpdatein interfacePreparedStatement- Overrides:
executeUpdatein classDelegatingCallableStatement- Throws:
SQLException
-
executeBatch
public int[] executeBatch() throws SQLException- Specified by:
executeBatchin interfaceStatement- Overrides:
executeBatchin classDelegatingCallableStatement- Throws:
SQLException
-
execute
public boolean execute() throws SQLException- Specified by:
executein interfacePreparedStatement- Overrides:
executein classDelegatingCallableStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String s, int i) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingCallableStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String s, int[] ia) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingCallableStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String s, String[] sa) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingCallableStatement- Throws:
SQLException
-
execute
public boolean execute(String s, int i) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingCallableStatement- Throws:
SQLException
-
execute
public boolean execute(String s, int[] ia) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingCallableStatement- Throws:
SQLException
-
execute
public boolean execute(String s, String[] sa) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingCallableStatement- Throws:
SQLException
-
cancel
public void cancel() throws SQLException- Specified by:
cancelin interfaceStatement- Overrides:
cancelin classDelegatingCallableStatement- Throws:
SQLException
-
setNull
public void setNull(int i1, int i2) throws SQLException- Specified by:
setNullin interfacePreparedStatement- Overrides:
setNullin classDelegatingCallableStatement- Throws:
SQLException
-
setBoolean
public void setBoolean(int i, boolean b) throws SQLException- Specified by:
setBooleanin interfacePreparedStatement- Overrides:
setBooleanin classDelegatingCallableStatement- Throws:
SQLException
-
setByte
public void setByte(int i, byte b) throws SQLException- Specified by:
setBytein interfacePreparedStatement- Overrides:
setBytein classDelegatingCallableStatement- Throws:
SQLException
-
setShort
public void setShort(int i, short s) throws SQLException- Specified by:
setShortin interfacePreparedStatement- Overrides:
setShortin classDelegatingCallableStatement- Throws:
SQLException
-
setInt
public void setInt(int i1, int i2) throws SQLException- Specified by:
setIntin interfacePreparedStatement- Overrides:
setIntin classDelegatingCallableStatement- Throws:
SQLException
-
setLong
public void setLong(int i, long l) throws SQLException- Specified by:
setLongin interfacePreparedStatement- Overrides:
setLongin classDelegatingCallableStatement- Throws:
SQLException
-
setFloat
public void setFloat(int i, float f) throws SQLException- Specified by:
setFloatin interfacePreparedStatement- Overrides:
setFloatin classDelegatingCallableStatement- Throws:
SQLException
-
setDouble
public void setDouble(int i, double d) throws SQLException- Specified by:
setDoublein interfacePreparedStatement- Overrides:
setDoublein classDelegatingCallableStatement- Throws:
SQLException
-
setBigDecimal
public void setBigDecimal(int i, BigDecimal bd) throws SQLException- Specified by:
setBigDecimalin interfacePreparedStatement- Overrides:
setBigDecimalin classDelegatingCallableStatement- Throws:
SQLException
-
setString
public void setString(int i, String s) throws SQLException- Specified by:
setStringin interfacePreparedStatement- Overrides:
setStringin classDelegatingCallableStatement- Throws:
SQLException
-
setBytes
public void setBytes(int i, byte[] b) throws SQLException- Specified by:
setBytesin interfacePreparedStatement- Overrides:
setBytesin classDelegatingCallableStatement- Throws:
SQLException
-
setDate
public void setDate(int i, Date d) throws SQLException- Specified by:
setDatein interfacePreparedStatement- Overrides:
setDatein classDelegatingCallableStatement- Throws:
SQLException
-
setTime
public void setTime(int i, Time t) throws SQLException- Specified by:
setTimein interfacePreparedStatement- Overrides:
setTimein classDelegatingCallableStatement- Throws:
SQLException
-
setTimestamp
public void setTimestamp(int i, Timestamp t) throws SQLException- Specified by:
setTimestampin interfacePreparedStatement- Overrides:
setTimestampin classDelegatingCallableStatement- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(int i1, InputStream is, int i2) throws SQLException- Specified by:
setAsciiStreamin interfacePreparedStatement- Overrides:
setAsciiStreamin classDelegatingCallableStatement- Throws:
SQLException
-
setUnicodeStream
@Deprecated public void setUnicodeStream(int i1, InputStream is, int i2) throws SQLException
Deprecated.- Specified by:
setUnicodeStreamin interfacePreparedStatement- Overrides:
setUnicodeStreamin classDelegatingCallableStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int i1, InputStream is, int i2) throws SQLException- Specified by:
setBinaryStreamin interfacePreparedStatement- Overrides:
setBinaryStreamin classDelegatingCallableStatement- Throws:
SQLException
-
clearParameters
public void clearParameters() throws SQLException- Specified by:
clearParametersin interfacePreparedStatement- Overrides:
clearParametersin classDelegatingCallableStatement- Throws:
SQLException
-
setObject
public void setObject(int i1, Object o, int i2, int i3) throws SQLException- Specified by:
setObjectin interfacePreparedStatement- Overrides:
setObjectin classDelegatingCallableStatement- Throws:
SQLException
-
setObject
public void setObject(int i1, Object o, int i2) throws SQLException- Specified by:
setObjectin interfacePreparedStatement- Overrides:
setObjectin classDelegatingCallableStatement- Throws:
SQLException
-
setObject
public void setObject(int i, Object o) throws SQLException- Specified by:
setObjectin interfacePreparedStatement- Overrides:
setObjectin classDelegatingCallableStatement- Throws:
SQLException
-
addBatch
public void addBatch() throws SQLException- Specified by:
addBatchin interfacePreparedStatement- Overrides:
addBatchin classDelegatingCallableStatement- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int i1, Reader r, int i2) throws SQLException- Specified by:
setCharacterStreamin interfacePreparedStatement- Overrides:
setCharacterStreamin classDelegatingCallableStatement- Throws:
SQLException
-
setRef
public void setRef(int i, Ref r) throws SQLException- Specified by:
setRefin interfacePreparedStatement- Overrides:
setRefin classDelegatingCallableStatement- Throws:
SQLException
-
setBlob
public void setBlob(int i, Blob b) throws SQLException- Specified by:
setBlobin interfacePreparedStatement- Overrides:
setBlobin classDelegatingCallableStatement- Throws:
SQLException
-
setClob
public void setClob(int i, Clob c) throws SQLException- Specified by:
setClobin interfacePreparedStatement- Overrides:
setClobin classDelegatingCallableStatement- Throws:
SQLException
-
setArray
public void setArray(int i, Array a) throws SQLException- Specified by:
setArrayin interfacePreparedStatement- Overrides:
setArrayin classDelegatingCallableStatement- Throws:
SQLException
-
getMetaData
public ResultSetMetaData getMetaData() throws SQLException
- Specified by:
getMetaDatain interfacePreparedStatement- Overrides:
getMetaDatain classDelegatingCallableStatement- Throws:
SQLException
-
setDate
public void setDate(int i, Date d, Calendar c) throws SQLException- Specified by:
setDatein interfacePreparedStatement- Overrides:
setDatein classDelegatingCallableStatement- Throws:
SQLException
-
setTime
public void setTime(int i, Time t, Calendar c) throws SQLException- Specified by:
setTimein interfacePreparedStatement- Overrides:
setTimein classDelegatingCallableStatement- Throws:
SQLException
-
setTimestamp
public void setTimestamp(int i, Timestamp t, Calendar c) throws SQLException- Specified by:
setTimestampin interfacePreparedStatement- Overrides:
setTimestampin classDelegatingCallableStatement- Throws:
SQLException
-
setNull
public void setNull(int i1, int i2, String s) throws SQLException- Specified by:
setNullin interfacePreparedStatement- Overrides:
setNullin classDelegatingCallableStatement- Throws:
SQLException
-
setURL
public void setURL(int i, URL u) throws SQLException- Specified by:
setURLin interfacePreparedStatement- Overrides:
setURLin classDelegatingCallableStatement- Throws:
SQLException
-
appendInfo
protected void appendInfo(StringBuffer buf)
- Overrides:
appendInfoin classDelegatingCallableStatement
-
clearLogParameters
protected void clearLogParameters(boolean batch)
-
-