@Target(value=FIELD) @Retention(value=RUNTIME) @Inherited @Documented public @interface DisableHandlers
RequiredDataAdvice, by default, RequiredDataHandlers are called on all child collections
of the OpenmrsObject being handled.
By annotating a Collection with a @DisableHandlers annotation, you specific that RequiredDataAdvice should NOT apply the specified
handler(s) to a child collection. For example:
private class ClassWithDisableHandlersAnnotation extends BaseOpenmrsData {
@DisableHandlers(handlerTypes = {VoidHandler.class, SaveHandler.class})
private List<Person> persons;
}
You can disable all RequiredDataAdviceHandlers by specifying the parent class: @DisableHandlers(handlerTypes = { RequiredDataHandler.class })| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends RequiredDataHandler>[] |
handlerTypes
The set of handlers to be be disabled
|
public abstract Class<? extends RequiredDataHandler>[] handlerTypes
Copyright © 2024 OpenMRS Inc.. All rights reserved.