Package org.apache.ibatis.logging.jdbc
Class ResultSetLogger
- java.lang.Object
-
- org.apache.ibatis.logging.jdbc.BaseJdbcLogger
-
- org.apache.ibatis.logging.jdbc.ResultSetLogger
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
public final class ResultSetLogger extends BaseJdbcLogger implements java.lang.reflect.InvocationHandler
ResultSet proxy to add logging.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<java.lang.Integer>BLOB_TYPESprivate java.util.Set<java.lang.Integer>blobColumnsprivate booleanfirstprivate introwsprivate java.sql.ResultSetrs-
Fields inherited from class org.apache.ibatis.logging.jdbc.BaseJdbcLogger
EXECUTE_METHODS, queryStack, SET_METHODS, statementLog
-
-
Constructor Summary
Constructors Modifier Constructor Description privateResultSetLogger(java.sql.ResultSet rs, Log statementLog, int queryStack)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.ResultSetgetRs()Get the wrapped result set.java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] params)static java.sql.ResultSetnewInstance(java.sql.ResultSet rs, Log statementLog, int queryStack)Creates a logging version of a ResultSet.private voidprintColumnHeaders(java.sql.ResultSetMetaData rsmd, int columnCount)private voidprintColumnValues(int columnCount)-
Methods inherited from class org.apache.ibatis.logging.jdbc.BaseJdbcLogger
clearColumnInfo, debug, getColumn, getColumnString, getParameterValueString, isDebugEnabled, isTraceEnabled, objectValueString, removeExtraWhitespace, setColumn, trace
-
-
-
-
Constructor Detail
-
ResultSetLogger
private ResultSetLogger(java.sql.ResultSet rs, Log statementLog, int queryStack)
-
-
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:
invokein interfacejava.lang.reflect.InvocationHandler- Throws:
java.lang.Throwable
-
printColumnHeaders
private void printColumnHeaders(java.sql.ResultSetMetaData rsmd, int columnCount) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
printColumnValues
private void printColumnValues(int columnCount)
-
newInstance
public static java.sql.ResultSet newInstance(java.sql.ResultSet rs, Log statementLog, int queryStack)Creates a logging version of a ResultSet.- Parameters:
rs- the ResultSet to proxystatementLog- the statement logqueryStack- the query stack- Returns:
- the ResultSet with logging
-
getRs
public java.sql.ResultSet getRs()
Get the wrapped result set.- Returns:
- the resultSet
-
-