I propose making the following SqlObject types public:
Handler@SqlMethodAnnotation and HandlerFactory@SqlMethodDecoratingAnnotation and HandlerDecoratorThis will allow users and library authors to create their own SQL method handlers and decorators, which will in turn make caching feasible as a bolt-on option for users who want it, although there may be other use cases we haven't thought of.
We should also introduce a way of specifying order for when there are multiple decorators. My gut tells me that a static @Priority annotation is not the best approach, since users might want different ordering in different scenarios.
For multiple decorators, one approach might be:
@interface DecoratorOrder {
Class<? extends Annotation>[] value();
}
Thus, in a sql object:
@FooDecorator
@BarDecorator
@DecoratorOrder(BarDecorator.class, FooDecorator.class)
List<Thing> listAllTheThings();
If you don't specify an order, then decorator order is undefined.
OK by me.
Fixed in #458
Most helpful comment
OK by me.