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:
- Statement, Wrapper, Closeable
- Enclosing class:
- LoggingConnectionDecorator.LoggingConnection
protected abstract 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.
Methods inherited from class org.apache.openjpa.lib.jdbc.DelegatingStatement |
addBatch, clearBatch, clearWarnings, close, enforceAbstract, equals, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, getConnection, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getInnermostDelegate, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, hashCode, isWrapperFor, newInstance, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, toString, unwrap |
LoggingConnectionDecorator.LoggingConnection.LoggingStatement
public LoggingConnectionDecorator.LoggingConnection.LoggingStatement(Statement stmnt)
throws SQLException
- Throws:
SQLException
appendInfo
public void appendInfo(StringBuffer buf)
- Overrides:
appendInfo
in class DelegatingStatement
wrapResult
protected ResultSet wrapResult(ResultSet rs,
boolean wrap)
- Overrides:
wrapResult
in class DelegatingStatement
cancel
public void cancel()
throws SQLException
- Specified by:
cancel
in interface Statement
- Overrides:
cancel
in class DelegatingStatement
- Throws:
SQLException
executeQuery
protected ResultSet executeQuery(String sql,
boolean wrap)
throws SQLException
- Description copied from class:
DelegatingStatement
- Execute the query, with the option of not wrapping it in a
DelegatingResultSet
, which is the default.
- Overrides:
executeQuery
in class DelegatingStatement
- Throws:
SQLException
executeUpdate
public int executeUpdate(String sql)
throws SQLException
- Specified by:
executeUpdate
in interface Statement
- Overrides:
executeUpdate
in class DelegatingStatement
- Throws:
SQLException
execute
public boolean execute(String sql)
throws SQLException
- Specified by:
execute
in interface Statement
- Overrides:
execute
in class DelegatingStatement
- Throws:
SQLException
Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.