org.apache.ibatis.logging.jdbc
Class PreparedStatementLogger

java.lang.Object
  extended by org.apache.ibatis.logging.jdbc.BaseJdbcLogger
      extended by org.apache.ibatis.logging.jdbc.PreparedStatementLogger
All Implemented Interfaces:
InvocationHandler

public class PreparedStatementLogger
extends BaseJdbcLogger
implements InvocationHandler

PreparedStatement proxy to add logging


Field Summary
 
Fields inherited from class org.apache.ibatis.logging.jdbc.BaseJdbcLogger
EXECUTE_METHODS, SET_METHODS
 
Method Summary
 PreparedStatement getPreparedStatement()
          Return the wrapped prepared statement
 Object invoke(Object proxy, Method method, Object[] params)
           
static PreparedStatement newInstance(PreparedStatement stmt, String sql)
          Creates a logging version of a PreparedStatement
 
Methods inherited from class org.apache.ibatis.logging.jdbc.BaseJdbcLogger
clearColumnInfo, getColumn, getColumnString, getParameterValueString, removeBreakingWhitespace, setColumn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 statement
sql - - the sql statement
Returns:
- the proxy

getPreparedStatement

public PreparedStatement getPreparedStatement()
Return the wrapped prepared statement

Returns:
the PreparedStatement


Copyright © 2010. All Rights Reserved.