|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||
@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Handler
Annotation through which handlers may be specified for an annotated method. Portions of pureQuery execution can be customized with user-provided handlers that implement one of the following
interfaces: CallHandlerWithParameters,
ParameterHandler, ResultHandler, and RowHandler. The different handlers modify different parts of the
execution of the method. Handlers can be specified for annotated methods either by using the @Handler annotation, or by specifying the handlers as parameters to the annotated
methods.
When a handler is specified by using the @Handler annotation, pureQuery creates a single instance of the handler that it uses every time the annotated method is invoked.
Therefore, specifying handlers with the @Handler annotation is generally slightly faster than specifying them as method parameters, but any handler specified in this way must have a
public no-argument constructor.
| Data Type | Element Name and Description |
|---|---|
Class<? extends CallHandlerWithParameters> |
callHandlerWithParametersAnnotation element through which a custom CallHandlerWithParameters implementation can be specified for an annotated method. |
Class<? extends ParameterHandler> |
parameterHandlerAnnotation element through which a custom ParameterHandler implementation can be specified for an annotated method. |
Class<? extends ResultHandler> |
resultHandlerAnnotation element through which a custom ResultHandler implementation can be specified for an annotated method. |
Class<? extends RowHandler> |
rowHandlerAnnotation element through which a custom RowHandler implementation can be specified for an annotated method. |
public abstract Class<? extends CallHandlerWithParameters> callHandlerWithParameters
CallHandlerWithParameters implementation can be specified for an annotated method. For more information about how to create a
custom class that implements CallHandlerWithParameters and how to specify the class with the annotation, see CallHandlerWithParameters.CallHandlerWithParameterspublic abstract Class<? extends ParameterHandler> parameterHandler
ParameterHandler implementation can be specified for an annotated method. For more information about how to create a custom class
that implements ParameterHandler and how to specify the class with the annotation, see ParameterHandler.ParameterHandlerpublic abstract Class<? extends ResultHandler> resultHandler
ResultHandler implementation can be specified for an annotated method. For more information about how to create a custom class
that implements ResultHandler and how to specify the class with the annotation, see ResultHandler.ResultHandlerpublic abstract Class<? extends RowHandler> rowHandler
RowHandler
implementation can be specified for an annotated method. For more information about how to create a custom class that implements RowHandler and how to specify the class with the
annotation, see RowHandler.RowHandler
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||