Class PreparedStatementLogger

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

public final class PreparedStatementLogger extends BaseJdbcLogger implements InvocationHandler
PreparedStatement 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 PreparedStatement newInstance(PreparedStatement stmt, Log statementLog, int queryStack)
      Creates a logging version of a PreparedStatement.
      Parameters:
      stmt - - the statement
      statementLog - - the statement log
      queryStack - - the query stack
      Returns:
      - the proxy
    • getPreparedStatement

      public PreparedStatement getPreparedStatement()
      Return the wrapped prepared statement.
      Returns:
      the PreparedStatement