Package org.apache.openjpa.lib.jdbc
Class LoggingConnectionDecorator.LoggingConnection.LoggingStatement
java.lang.Object
org.apache.openjpa.lib.jdbc.DelegatingStatement
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.LoggingStatement
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper,Closeable
- Enclosing class:
- LoggingConnectionDecorator.LoggingConnection
protected class LoggingConnectionDecorator.LoggingConnection.LoggingStatement
extends DelegatingStatement
Statement wrapper that logs SQL to the parent data source and
remembers the last piece of SQL to be executed on it.
-
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidappendInfo(StringBuffer buf) voidcancel()booleanbooleanbooleanbooleanprotected ResultSetexecuteQuery(String sql, boolean wrap) Execute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.intexecuteUpdate(String sql) intexecuteUpdate(String sql, int i) intexecuteUpdate(String sql, int[] ia) intexecuteUpdate(String sql, String[] sa) protected ResultSetwrapResult(ResultSet rs, boolean wrap) Methods inherited from class org.apache.openjpa.lib.jdbc.DelegatingStatement
addBatch, clearBatch, clearWarnings, close, closeOnCompletion, equals, executeBatch, executeQuery, getConnection, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getInnermostDelegate, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, hashCode, initialize, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, toString, unwrapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
-
Constructor Details
-
LoggingStatement
- Throws:
SQLException
-
-
Method Details
-
appendInfo
- Overrides:
appendInfoin classDelegatingStatement
-
wrapResult
- Overrides:
wrapResultin classDelegatingStatement
-
cancel
- Specified by:
cancelin interfaceStatement- Overrides:
cancelin classDelegatingStatement- Throws:
SQLException
-
executeQuery
Description copied from class:DelegatingStatementExecute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Overrides:
executeQueryin classDelegatingStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDelegatingStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classDelegatingStatement- Throws:
SQLException
-