Class StatementLogger

java.lang.Object
org.apache.ibatis.logging.jdbc.BaseJdbcLogger
org.apache.ibatis.logging.jdbc.StatementLogger
All Implemented Interfaces:
InvocationHandler

public final class StatementLogger extends BaseJdbcLogger implements InvocationHandler
Statement proxy to add logging.
Author:
Clinton Begin, Eduardo Macarron
  • Method Details

    • invoke

      public Object invoke(Object proxy, Method method, Object[] params) throws Throwable
      Specified by:
      invoke in interface InvocationHandler
      Throws:
      Throwable
    • newInstance

      public static Statement newInstance(Statement stmt, Log statementLog, int queryStack)
      Creates a logging version of a Statement.
      Parameters:
      stmt - the statement
      statementLog - the statement log
      queryStack - the query stack
      Returns:
      the proxy
    • getStatement

      public Statement getStatement()
      return the wrapped statement.
      Returns:
      the statement