org.jooq.tools
Class LoggerListener

java.lang.Object
  extended by org.jooq.impl.DefaultExecuteListener
      extended by org.jooq.tools.LoggerListener
All Implemented Interfaces:
ExecuteListener

public class LoggerListener
extends DefaultExecuteListener

A default ExecuteListener that just logs events to java.util.logging, log4j, or slf4j using the JooqLogger

Author:
Lukas Eder

Constructor Summary
LoggerListener()
           
 
Method Summary
 void recordEnd(ExecuteContext ctx)
          Called after fetching a record from a ResultSet Available attributes from ExecuteContext: ExecuteContext.getConnection(): The connection used for execution ExecuteContext.configuration(): The execution configuration ExecuteContext.query(): The Query object, if a jOOQ query is being executed or null otherwise ExecuteContext.routine(): The Routine object, if a jOOQ routine is being executed or null otherwise ExecuteContext.sql(): The rendered SQL statement that is about to be executed, or null if the SQL statement is unknown..
 void renderEnd(ExecuteContext ctx)
          Called after rendering SQL from a QueryPart Available attributes from ExecuteContext: ExecuteContext.getConnection(): The connection used for execution ExecuteContext.configuration(): The execution configuration ExecuteContext.query(): The Query object, if a jOOQ query is being executed or null otherwise ExecuteContext.routine(): The Routine object, if a jOOQ routine is being executed or null otherwise ExecuteContext.sql(): The rendered SQL statement that is about to be executed, or null if the SQL statement is unknown..
 void resultEnd(ExecuteContext ctx)
          Called after fetching a set of records from a ResultSet Available attributes from ExecuteContext: ExecuteContext.getConnection(): The connection used for execution ExecuteContext.configuration(): The execution configuration ExecuteContext.query(): The Query object, if a jOOQ query is being executed or null otherwise ExecuteContext.routine(): The Routine object, if a jOOQ routine is being executed or null otherwise ExecuteContext.sql(): The rendered SQL statement that is about to be executed, or null if the SQL statement is unknown..
 
Methods inherited from class org.jooq.impl.DefaultExecuteListener
bindEnd, bindStart, end, executeEnd, executeStart, fetchEnd, fetchStart, prepareEnd, prepareStart, recordStart, renderStart, resultStart, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerListener

public LoggerListener()
Method Detail

renderEnd

public void renderEnd(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called after rendering SQL from a QueryPart

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Specified by:
renderEnd in interface ExecuteListener
Overrides:
renderEnd in class DefaultExecuteListener

recordEnd

public void recordEnd(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called after fetching a record from a ResultSet

Available attributes from ExecuteContext:

Note that this method is not called when executing queries that do not return a result, or when executing routines.

Specified by:
recordEnd in interface ExecuteListener
Overrides:
recordEnd in class DefaultExecuteListener

resultEnd

public void resultEnd(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called after fetching a set of records from a ResultSet

Available attributes from ExecuteContext:

Note that this method is not called when executing queries that do not return a result, or when executing routines. This is also not called when fetching single records, with Cursor.fetchOne() for instance.

Specified by:
resultEnd in interface ExecuteListener
Overrides:
resultEnd in class DefaultExecuteListener


Copyright © 2012. All Rights Reserved.