public class HandlerDecorators extends Object implements JdbiConfig<HandlerDecorators>
handler decorators. Decorators may modify or augment the behavior of a method
Handler in some way. Out of the box, a decorator is registered which applies decorations for any
decorating annotations present on a SQL method. For example, using the
Transaction annotation will cause a SQL method to be executed within a
transaction. Decorators are applied in the order registered, from innermost to outermost: the last registered
decorator will be the outermost decorator around the method handler.| Constructor and Description |
|---|
HandlerDecorators() |
| Modifier and Type | Method and Description |
|---|---|
Handler |
applyDecorators(Handler base,
Class<?> sqlObjectType,
Method method)
Applies all registered decorators to the given handler
|
HandlerDecorators |
createCopy() |
HandlerDecorators |
register(HandlerDecorator decorator)
Registers the given handler decorator with the registry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetRegistrypublic HandlerDecorators register(HandlerDecorator decorator)
decorator - the decorator to registerpublic Handler applyDecorators(Handler base, Class<?> sqlObjectType, Method method)
base - the base handlersqlObjectType - the SQL object typemethod - the SQL method to be decoratedpublic HandlerDecorators createCopy()
createCopy in interface JdbiConfig<HandlerDecorators>Copyright © 2020. All rights reserved.