Class StatementLogger

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler

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

      • 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.Statement newInstance​(java.sql.Statement stmt,
                                                     Log statementLog,
                                                     int queryStack)
        Creates a logging version of a Statement.
        Parameters:
        stmt - - the statement
        Returns:
        - the proxy
      • getStatement

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