@Handler(supports=Drug.class, order=50) public class ConceptDrugValidator extends java.lang.Object implements org.springframework.validation.Validator
Drug
objects.Constructor and Description |
---|
ConceptDrugValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
supports(java.lang.Class c)
Determines if the command object being submitted is a valid type
|
void |
validate(java.lang.Object obj,
org.springframework.validation.Errors errors)
Checks that a given
Drug object is valid. |
public boolean supports(java.lang.Class c)
supports
in interface org.springframework.validation.Validator
Validator.supports(java.lang.Class)
public void validate(java.lang.Object obj, org.springframework.validation.Errors errors) throws java.lang.IllegalArgumentException
Drug
object is valid.validate
in interface org.springframework.validation.Validator
obj
- the Object to validateerrors
- holds the validation errorsIllegalArgumentException
- Runtime Exception if the supplied argument is
null or not of type Drug
java.lang.IllegalArgumentException
Validator.validate(java.lang.Object,
org.springframework.validation.Errors)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.