Package org.jdbi.v3.sqlobject
Class SqlMethodAnnotatedHandlerDecorator
- java.lang.Object
-
- org.jdbi.v3.sqlobject.SqlMethodAnnotatedHandlerDecorator
-
- All Implemented Interfaces:
ExtensionHandlerCustomizer,HandlerDecorator
class SqlMethodAnnotatedHandlerDecorator extends java.lang.Object implements HandlerDecorator
Applies decorations to method handlers, according to anydecorating annotationspresent on the method. If multiple decorating annotations are present, the order of application can be controlled using theDecoratorOrderannotation.This decorator is registered out of the box and supports the deprecated
SqlMethodDecoratingAnnotationannotations.
-
-
Constructor Summary
Constructors Constructor Description SqlMethodAnnotatedHandlerDecorator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static HandlerDecoratorbuildDecorator(java.lang.Class<? extends HandlerDecorator> decoratorClass)private java.util.Comparator<java.lang.Class<? extends java.lang.annotation.Annotation>>createDecoratorComparator(DecoratorOrder order)HandlerdecorateHandler(Handler delegate, java.lang.Class<?> sqlObjectType, java.lang.reflect.Method method)Decorates theHandlerto add or substitute behavior on the given SQL Object method.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jdbi.v3.sqlobject.HandlerDecorator
customize
-
-
-
-
Method Detail
-
decorateHandler
public Handler decorateHandler(Handler delegate, java.lang.Class<?> sqlObjectType, java.lang.reflect.Method method)
Description copied from interface:HandlerDecoratorDecorates theHandlerto add or substitute behavior on the given SQL Object method. Implementations may alternatively return the base handler, e.g. if the conditions for applying a particular decoration are not met.- Specified by:
decorateHandlerin interfaceHandlerDecorator- Parameters:
delegate- the base handler to decoratesqlObjectType- the SQL Object typemethod- the method to be decorated- Returns:
- the base handle, or a decorated handler (depending on the decorator implementation).
-
createDecoratorComparator
private java.util.Comparator<java.lang.Class<? extends java.lang.annotation.Annotation>> createDecoratorComparator(DecoratorOrder order)
-
buildDecorator
private static HandlerDecorator buildDecorator(java.lang.Class<? extends HandlerDecorator> decoratorClass)
-
-