org.jooq.impl
Class DefaultExecuteListener

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

public class DefaultExecuteListener
extends Object
implements ExecuteListener

A publicly available default implementation of ExecuteListener.

Use this to stay compatible with future API changes (i.e. added methods to ExecuteListener)

Author:
Lukas Eder

Constructor Summary
DefaultExecuteListener()
           
 
Method Summary
 void bindEnd(ExecuteContext ctx)
          Called after binding variables to the PreparedStatement 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 bindStart(ExecuteContext ctx)
          Called before binding variables to the PreparedStatement 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 end(ExecuteContext ctx)
          Called at the end of the execution lifecycle.
 void exception(ExecuteContext ctx)
          Called in the event of an exception at any moment of the execution lifecycle.
 void executeEnd(ExecuteContext ctx)
          Called after executing a statement 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 executeStart(ExecuteContext ctx)
          Called before executing a statement 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 fetchEnd(ExecuteContext ctx)
          Called after fetching data from a ResultSet.
 void fetchStart(ExecuteContext ctx)
          Called before fetching data from a ResultSet.
 void prepareEnd(ExecuteContext ctx)
          Called after preparing / creating the SQL statement 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 prepareStart(ExecuteContext ctx)
          Called before preparing / creating the SQL statement 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 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 recordStart(ExecuteContext ctx)
          Called before 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 renderStart(ExecuteContext ctx)
          Called before 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
 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..
 void resultStart(ExecuteContext ctx)
          Called before 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..
 void start(ExecuteContext ctx)
          Called to initialise an ExecuteListener 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 Overridable attributes in ExecuteContext: ExecuteContext.setConnection(Connection): The connection used for execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExecuteListener

public DefaultExecuteListener()
Method Detail

start

public void start(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called to initialise an ExecuteListener

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Specified by:
start in interface ExecuteListener

renderStart

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

Available attributes from ExecuteContext:

Specified by:
renderStart in interface ExecuteListener

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

prepareStart

public void prepareStart(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called before preparing / creating the SQL statement

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Specified by:
prepareStart in interface ExecuteListener

prepareEnd

public void prepareEnd(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called after preparing / creating the SQL statement

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Specified by:
prepareEnd in interface ExecuteListener

bindStart

public void bindStart(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called before binding variables to the PreparedStatement

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Note that this method is not called when executing queries of type StatementType.STATIC_STATEMENT

Specified by:
bindStart in interface ExecuteListener

bindEnd

public void bindEnd(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called after binding variables to the PreparedStatement

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Note that this method is not called when executing queries of type StatementType.STATIC_STATEMENT

Specified by:
bindEnd in interface ExecuteListener

executeStart

public void executeStart(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called before executing a statement

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Specified by:
executeStart in interface ExecuteListener

executeEnd

public void executeEnd(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called after executing a statement

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Specified by:
executeEnd in interface ExecuteListener

fetchStart

public void fetchStart(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called before fetching data from a ResultSet.

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

In case of multiple ResultSets with ResultQuery.fetchMany(), this is called several times, once per ResultSet

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

Specified by:
fetchStart in interface ExecuteListener

resultStart

public void resultStart(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called before 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:
resultStart in interface ExecuteListener

recordStart

public void recordStart(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called before 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:
recordStart in interface ExecuteListener

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

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

fetchEnd

public void fetchEnd(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called after fetching data from a ResultSet.

Available attributes from ExecuteContext:

In case of multiple ResultSets with ResultQuery.fetchMany(), this is called several times, once per ResultSet

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

Specified by:
fetchEnd in interface ExecuteListener

end

public void end(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called at the end of the execution lifecycle.

Available attributes from ExecuteContext:

Specified by:
end in interface ExecuteListener

exception

public void exception(ExecuteContext ctx)
Description copied from interface: ExecuteListener
Called in the event of an exception at any moment of the execution lifecycle.

Available attributes from ExecuteContext:

Specified by:
exception in interface ExecuteListener


Copyright © 2012. All Rights Reserved.