org.apache.ibatis.logging.jdbc
Class ConnectionLogger

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

public class ConnectionLogger
extends BaseJdbcLogger
implements InvocationHandler

Connection proxy to add logging


Field Summary
 
Fields inherited from class org.apache.ibatis.logging.jdbc.BaseJdbcLogger
EXECUTE_METHODS, SET_METHODS
 
Method Summary
 Connection getConnection()
          return the wrapped connection
 Object invoke(Object proxy, Method method, Object[] params)
           
static Connection newInstance(Connection conn)
          Creates a logging version of a connection
 
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 Connection newInstance(Connection conn)
Creates a logging version of a connection

Parameters:
conn - - the original connection
Returns:
- the connection with logging

getConnection

public Connection getConnection()
return the wrapped connection

Returns:
the connection


Copyright © 2010. All Rights Reserved.