public class ValidateUtil extends Object
public Order saveOrder(order) { ValidateUtil.validate(order); dao.saveOrder(order); }
Constructor and Description |
---|
ValidateUtil() |
Modifier and Type | Method and Description |
---|---|
protected static List<org.springframework.validation.Validator> |
getValidators(Object obj)
Fetches all validators that are registered
|
void |
setValidators(List<org.springframework.validation.Validator> newValidators)
Deprecated.
in favor of using HandlerUtil to reflexively get validators
|
static void |
validate(Object obj)
Test the given object against all validators that are registered as compatible with the
object class
|
@Deprecated public void setValidators(List<org.springframework.validation.Validator> newValidators)
newValidators
- the validators to setprotected static List<org.springframework.validation.Validator> getValidators(Object obj)
obj
- the object that will be validatedpublic static void validate(Object obj) throws APIException
obj
- the object to validateAPIException
- thrown if a binding exception occursCopyright © 2018 OpenMRS LLC.. All Rights Reserved.