sf logo

sf.qof.customizer
Class DefaultConnectionFactoryCustomizer

java.lang.Object
  extended by sf.qof.customizer.DefaultConnectionFactoryCustomizer
All Implemented Interfaces:
ConnectionFactoryCustomizer

public class DefaultConnectionFactoryCustomizer
extends Object
implements ConnectionFactoryCustomizer

Provides the default implementation of a ConnectionFactoryCustomizer. This customizer implements getConnection() and setConnection() methods and a private field to store it if the super class does not have a getConnection() method defined.

See Also:
ConnectionFactoryCustomizer

Constructor Summary
DefaultConnectionFactoryCustomizer()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConnectionFactoryCustomizer

public DefaultConnectionFactoryCustomizer()
Method Detail

emitFields

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

Specified by:
emitFields in interface ConnectionFactoryCustomizer
Parameters:
queryDefinitionClass - the annotated query definition class
superClass - the super class
ce - the class emitter

emitGetConnection

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

Specified by:
emitGetConnection in interface ConnectionFactoryCustomizer
Parameters:
queryDefinitionClass - the annotated query definition class
superClass - the super class
ce - the class emitter
See Also:
BaseQuery.getConnection()

emitSetConnection

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

Specified by:
emitSetConnection in interface ConnectionFactoryCustomizer
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.