|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsf.qof.customizer.SessionContextConnectionFactoryCustomizer
public class SessionContextConnectionFactoryCustomizer
Provides the implementation of a ConnectionFactoryCustomizer to use the
SessionContextFactory.
This customizer implements getConnection() and
setConnection() methods. It delegates calls to
getConnection() to
SessionContextFactory.getContext().getConnection(). Calls to
setConnection() throws a RuntimeException.
The UseSessionContext annotation indicates that this
customizer should be used and allows to specify a session context name.
SessionContextFactory,
UseSessionContext| Constructor Summary | |
|---|---|
SessionContextConnectionFactoryCustomizer()
|
|
| 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 |
|---|
public SessionContextConnectionFactoryCustomizer()
| Method Detail |
|---|
public void emitFields(Class<?> queryDefinitionClass,
Class<?> superClass,
net.sf.cglib.core.ClassEmitter ce)
ConnectionFactoryCustomizergetConnection() and setConnection() implementation.
emitFields in interface ConnectionFactoryCustomizerqueryDefinitionClass - the annotated query definition classsuperClass - the super classce - the class emitter
public void emitGetConnection(Class<?> queryDefinitionClass,
Class<?> superClass,
net.sf.cglib.core.ClassEmitter ce)
ConnectionFactoryCustomizergetConnection()
method as specified in the BaseQuery interface.
emitGetConnection in interface ConnectionFactoryCustomizerqueryDefinitionClass - the annotated query definition classsuperClass - the super classce - the class emitterBaseQuery.getConnection()
public void emitSetConnection(Class<?> queryDefinitionClass,
Class<?> superClass,
net.sf.cglib.core.ClassEmitter ce)
ConnectionFactoryCustomizersetConnection()
method as specified in the BaseQuery interface.
emitSetConnection in interface ConnectionFactoryCustomizerqueryDefinitionClass - the annotated query definition classsuperClass - the super classce - the class emitterBaseQuery.setConnection(java.sql.Connection)
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||