@Target(value=TYPE) @Retention(value=RUNTIME) @Inherited @Documented public @interface Handler
Validator
class and implementations.
As currently designed, a Validator takes in an open-ended Object to validate:
public void validate(Object obj, Errors errors)
public boolean supports(Class c)
@Handler( supports = { Order.class } ) public class OrderValidator implements Validator { ... }
public abstract Class<?>[] supports
public abstract int order
DateDatatype
class, and one handler had an order of
100 and the other had an order of 50, the
consuming code could utilize this information to determine which handler is preferred. By
convention, the handler with the lowest order generally gains precedence.Copyright © 2024 OpenMRS Inc.. All rights reserved.