sf logo

sf.qof.customizer
Interface ConnectionFactoryCustomizer

All Known Implementing Classes:
DefaultConnectionFactoryCustomizer, SessionContextConnectionFactoryCustomizer

public interface ConnectionFactoryCustomizer

Defines the methods of a customizer for the implementation of the getConnection() and setConnection(). The emit methods are called during the code generation to implement connection handling in the generated query object class. It allows query object classes to aquire the database connection from different data sources.


Method Summary
 void emitFields(Class<?> queryDefinitionClass, Class<?> superClass, net.sf.cglib.core.ClassEmitter ce)
          This method can add fields to the generated query object if needed by the getConnection() and setConnection() implementation.
 void emitGetConnection(Class<?> queryDefinitionClass, Class<?> superClass, net.sf.cglib.core.ClassEmitter ce)
          This method must implement the getConnection() method as specified in the BaseQuery interface.
 void emitSetConnection(Class<?> queryDefinitionClass, Class<?> superClass, net.sf.cglib.core.ClassEmitter ce)
          This method must implement the setConnection() method as specified in the BaseQuery interface.
 

Method Detail

emitFields

void emitFields(Class<?> queryDefinitionClass,
                Class<?> superClass,
                net.sf.cglib.core.ClassEmitter ce)
This method can add fields to the generated query object if needed by the getConnection() and setConnection() implementation.

Parameters:
queryDefinitionClass - the annotated query definition class
superClass - the super class
ce - the class emitter

emitGetConnection

void emitGetConnection(Class<?> queryDefinitionClass,
                       Class<?> superClass,
                       net.sf.cglib.core.ClassEmitter ce)
This method must implement the getConnection() method as specified in the BaseQuery interface.

Parameters:
queryDefinitionClass - the annotated query definition class
superClass - the super class
ce - the class emitter
See Also:
BaseQuery.getConnection()

emitSetConnection

void emitSetConnection(Class<?> queryDefinitionClass,
                       Class<?> superClass,
                       net.sf.cglib.core.ClassEmitter ce)
This method must implement the setConnection() method as specified in the BaseQuery interface.

Parameters:
queryDefinitionClass - the annotated query definition class
superClass - the super class
ce - the class emitter
See Also:
BaseQuery.setConnection(java.sql.Connection)

sf logo

Copyright © 2007 brunella ltd. All Rights Reserved.