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