protected class LoggingConnectionDecorator.LoggingConnection extends DelegatingConnection
| Modifier and Type | Class and Description |
|---|---|
protected class |
LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement
CallableStatement decorated with logging.
|
protected class |
LoggingConnectionDecorator.LoggingConnection.LoggingDatabaseMetaData
Metadata wrapper that logs actions.
|
protected class |
LoggingConnectionDecorator.LoggingConnection.LoggingPreparedStatement |
protected class |
LoggingConnectionDecorator.LoggingConnection.LoggingResultSet
Warning-handling result set.
|
protected class |
LoggingConnectionDecorator.LoggingConnection.LoggingStatement
Statement wrapper that logs SQL to the parent data source and
remembers the last piece of SQL to be executed on it.
|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
LoggingConnection(Connection conn) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
commit() |
protected Statement |
createStatement(boolean wrap)
Create a statement, with the option of not wrapping it in a
DelegatingStatement, which is the default. |
protected Statement |
createStatement(int type,
int concurrency,
boolean wrap)
Create a statement, with the option of not wrapping it in a
DelegatingStatement, which is the default. |
protected Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap) |
protected DatabaseMetaData |
getMetaData(boolean wrap)
Return the metadata, with the option of not wrapping it in a
DelegatingDatabaseMetaData, which is the default. |
protected CallableStatement |
prepareCall(String sql,
boolean wrap)
Prepare a call, with the option of not wrapping it in a
DelegatingCallableStatement, which is the default. |
protected PreparedStatement |
prepareStatement(String sql,
boolean wrap)
Prepare a statement, with the option of not wrapping it in a
DelegatingPreparedStatement, which is the default. |
protected PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes,
boolean wrap) |
protected PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys,
boolean wrap) |
protected PreparedStatement |
prepareStatement(String sql,
int rsType,
int rsConcur,
boolean wrap)
Prepare a statement, with the option of not wrapping it in a
DelegatingPreparedStatement, which is the default. |
protected PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap) |
protected PreparedStatement |
prepareStatement(String sql,
String[] columnNames,
boolean wrap) |
void |
releaseSavepoint(Savepoint savepoint) |
void |
rollback() |
void |
rollback(Savepoint savepoint) |
Savepoint |
setSavepoint() |
Savepoint |
setSavepoint(String name) |
abort, appendInfo, clearWarnings, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, equals, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getDelegate, getHoldability, getInnermostDelegate, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, hashCode, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSchema, setTransactionIsolation, setTypeMap, toString, unwrappublic LoggingConnection(Connection conn) throws SQLException
SQLExceptionprotected PreparedStatement prepareStatement(String sql, boolean wrap) throws SQLException
DelegatingConnectionDelegatingPreparedStatement, which is the default.prepareStatement in class DelegatingConnectionSQLExceptionprotected PreparedStatement prepareStatement(String sql, int rsType, int rsConcur, boolean wrap) throws SQLException
DelegatingConnectionDelegatingPreparedStatement, which is the default.prepareStatement in class DelegatingConnectionSQLExceptionprotected Statement createStatement(boolean wrap) throws SQLException
DelegatingConnectionDelegatingStatement, which is the default.createStatement in class DelegatingConnectionSQLExceptionprotected Statement createStatement(int type, int concurrency, boolean wrap) throws SQLException
DelegatingConnectionDelegatingStatement, which is the default.createStatement in class DelegatingConnectionSQLExceptionprotected CallableStatement prepareCall(String sql, boolean wrap) throws SQLException
DelegatingConnectionDelegatingCallableStatement, which is the default.prepareCall in class DelegatingConnectionSQLExceptionpublic void commit()
throws SQLException
commit in interface Connectioncommit in class DelegatingConnectionSQLExceptionpublic void rollback()
throws SQLException
rollback in interface Connectionrollback in class DelegatingConnectionSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface Connectionclose in interface Closeableclose in class DelegatingConnectionSQLExceptionpublic Savepoint setSavepoint() throws SQLException
setSavepoint in interface ConnectionsetSavepoint in class DelegatingConnectionSQLExceptionpublic Savepoint setSavepoint(String name) throws SQLException
setSavepoint in interface ConnectionsetSavepoint in class DelegatingConnectionSQLExceptionpublic void rollback(Savepoint savepoint) throws SQLException
rollback in interface Connectionrollback in class DelegatingConnectionSQLExceptionpublic void releaseSavepoint(Savepoint savepoint) throws SQLException
releaseSavepoint in interface ConnectionreleaseSavepoint in class DelegatingConnectionSQLExceptionprotected Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws SQLException
createStatement in class DelegatingConnectionSQLExceptionprotected PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws SQLException
prepareStatement in class DelegatingConnectionSQLExceptionprotected PreparedStatement prepareStatement(String sql, int autoGeneratedKeys, boolean wrap) throws SQLException
prepareStatement in class DelegatingConnectionSQLExceptionprotected PreparedStatement prepareStatement(String sql, int[] columnIndexes, boolean wrap) throws SQLException
prepareStatement in class DelegatingConnectionSQLExceptionprotected PreparedStatement prepareStatement(String sql, String[] columnNames, boolean wrap) throws SQLException
prepareStatement in class DelegatingConnectionSQLExceptionprotected DatabaseMetaData getMetaData(boolean wrap) throws SQLException
DelegatingConnectionDelegatingDatabaseMetaData, which is the default.getMetaData in class DelegatingConnectionSQLExceptionCopyright © 2006–2022 Apache Software Foundation. All rights reserved.