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.
|
| Constructor and Description |
|---|
LoggingConnectionDecorator.LoggingConnection(java.sql.Connection conn) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
commit() |
protected java.sql.Statement |
createStatement(boolean wrap)
Create a statement, with the option of not wrapping it in a
DelegatingStatement, which is the default. |
protected java.sql.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 java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap) |
protected java.sql.DatabaseMetaData |
getMetaData(boolean wrap)
Return the metadata, with the option of not wrapping it in a
DelegatingDatabaseMetaData, which is the default. |
protected java.sql.CallableStatement |
prepareCall(java.lang.String sql,
boolean wrap)
Prepare a call, with the option of not wrapping it in a
DelegatingCallableStatement, which is the default. |
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
boolean wrap)
Prepare a statement, with the option of not wrapping it in a
DelegatingPreparedStatement, which is the default. |
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes,
boolean wrap) |
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys,
boolean wrap) |
protected java.sql.PreparedStatement |
prepareStatement(java.lang.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 java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap) |
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames,
boolean wrap) |
void |
releaseSavepoint(java.sql.Savepoint savepoint) |
void |
rollback() |
void |
rollback(java.sql.Savepoint savepoint) |
java.sql.Savepoint |
setSavepoint() |
java.sql.Savepoint |
setSavepoint(java.lang.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 LoggingConnectionDecorator.LoggingConnection(java.sql.Connection conn)
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
boolean wrap)
throws java.sql.SQLException
DelegatingConnectionDelegatingPreparedStatement, which is the default.prepareStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int rsType,
int rsConcur,
boolean wrap)
throws java.sql.SQLException
DelegatingConnectionDelegatingPreparedStatement, which is the default.prepareStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.Statement createStatement(boolean wrap)
throws java.sql.SQLException
DelegatingConnectionDelegatingStatement, which is the default.createStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.Statement createStatement(int type,
int concurrency,
boolean wrap)
throws java.sql.SQLException
DelegatingConnectionDelegatingStatement, which is the default.createStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.CallableStatement prepareCall(java.lang.String sql,
boolean wrap)
throws java.sql.SQLException
DelegatingConnectionDelegatingCallableStatement, which is the default.prepareCall in class DelegatingConnectionjava.sql.SQLExceptionpublic void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectioncommit in class DelegatingConnectionjava.sql.SQLExceptionpublic void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionrollback in class DelegatingConnectionjava.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
close in interface java.lang.AutoCloseableclose in interface java.sql.Connectionclose in interface Closeableclose in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.ConnectionsetSavepoint in class DelegatingConnectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.ConnectionsetSavepoint in class DelegatingConnectionjava.sql.SQLExceptionpublic void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionrollback in class DelegatingConnectionjava.sql.SQLExceptionpublic void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.ConnectionreleaseSavepoint in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap)
throws java.sql.SQLException
createStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap)
throws java.sql.SQLException
prepareStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys,
boolean wrap)
throws java.sql.SQLException
prepareStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes,
boolean wrap)
throws java.sql.SQLException
prepareStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames,
boolean wrap)
throws java.sql.SQLException
prepareStatement in class DelegatingConnectionjava.sql.SQLExceptionprotected java.sql.DatabaseMetaData getMetaData(boolean wrap)
throws java.sql.SQLException
DelegatingConnectionDelegatingDatabaseMetaData, which is the default.getMetaData in class DelegatingConnectionjava.sql.SQLExceptionCopyright © 2006-2013 Apache Software Foundation. All Rights Reserved.