org.apache.ibatis.logging.jdbc
Class PreparedStatementLogger
java.lang.Object
org.apache.ibatis.logging.jdbc.BaseJdbcLogger
org.apache.ibatis.logging.jdbc.PreparedStatementLogger
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
public class PreparedStatementLogger
- extends BaseJdbcLogger
- implements java.lang.reflect.InvocationHandler
PreparedStatement proxy to add logging
Method Summary |
java.sql.PreparedStatement |
getPreparedStatement()
Return the wrapped prepared statement |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
|
static java.sql.PreparedStatement |
newInstance(java.sql.PreparedStatement stmt,
java.lang.String sql)
Creates a logging version of a PreparedStatement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
throws java.lang.Throwable
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
newInstance
public static java.sql.PreparedStatement newInstance(java.sql.PreparedStatement stmt,
java.lang.String sql)
- Creates a logging version of a PreparedStatement
- Parameters:
stmt
- - the statementsql
- - the sql statement
- Returns:
- - the proxy
getPreparedStatement
public java.sql.PreparedStatement getPreparedStatement()
- Return the wrapped prepared statement
- Returns:
- the PreparedStatement
Copyright © 2010 MyBatis.org. All Rights Reserved.