public class LoggingStatementHandler extends Object implements InvocationHandler
InvocationHandler implementation for a proxy to the Statement interface
which logs relevant JDBC or SQL calls to the log categories org.databene.JDBC
and org.databene.SQL.| Constructor and Description |
|---|
LoggingStatementHandler(Statement realStatement,
boolean readOnly) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
assertAllStatementsClosed(boolean critical) |
void |
close() |
boolean |
execute(String sql) |
boolean |
execute(String sql,
int autoGeneratedKeys) |
boolean |
execute(String sql,
int[] columnIndexes) |
boolean |
execute(String sql,
String[] columnNames) |
int[] |
executeBatch() |
ResultSet |
executeQuery(String sql) |
int |
executeUpdate(String sql) |
int |
executeUpdate(String sql,
int autoGeneratedKeys) |
int |
executeUpdate(String sql,
int[] columnIndexes) |
int |
executeUpdate(String sql,
String[] columnNames) |
static int |
getOpenStatementCount() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
static void |
resetMonitors() |
String |
toString() |
public LoggingStatementHandler(Statement realStatement, boolean readOnly)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowablepublic boolean execute(String sql, int autoGeneratedKeys) throws SQLException
SQLExceptionpublic boolean execute(String sql, int[] columnIndexes) throws SQLException
SQLExceptionpublic boolean execute(String sql, String[] columnNames) throws SQLException
SQLExceptionpublic boolean execute(String sql) throws SQLException
SQLExceptionpublic int[] executeBatch()
throws SQLException
SQLExceptionpublic ResultSet executeQuery(String sql) throws SQLException
SQLExceptionpublic int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
SQLExceptionpublic int executeUpdate(String sql, int[] columnIndexes) throws SQLException
SQLExceptionpublic int executeUpdate(String sql, String[] columnNames) throws SQLException
SQLExceptionpublic int executeUpdate(String sql) throws SQLException
SQLExceptionpublic void close()
throws SQLException
SQLExceptionpublic static int getOpenStatementCount()
public static void resetMonitors()
public static boolean assertAllStatementsClosed(boolean critical)
Copyright © 2006–2014 Volker Bergmann. All rights reserved.