@Handler(supports=ConceptReferenceTerm.class, order=50) public class ConceptReferenceTermValidator extends Object implements org.springframework.validation.Validator
ConceptReferenceTerm objects.| Constructor and Description | 
|---|
| ConceptReferenceTermValidator() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | supports(Class<?> c)Determines if the command object being submitted is a valid type | 
| void | validate(Object obj,
        org.springframework.validation.Errors errors)Checks that a given concept reference term object is valid. | 
public boolean supports(Class<?> c)
supports in interface org.springframework.validation.ValidatorValidator.supports(java.lang.Class)public void validate(Object obj, org.springframework.validation.Errors errors) throws APIException
validate in interface org.springframework.validation.ValidatorAPIExceptionShould fail if the concept reference term object is null
 Should fail if the name is a white space character
 Should fail if the code is null
 Should fail if the code is an empty string
 Should fail if the code is a white space character
 Should fail if the concept reference term code is a duplicate in its concept source
 Should fail if the concept source is null
 Should pass if all the required fields are set and valid
 Should pass if the duplicate name is for a term from another concept source
 Should pass if the duplicate code is for a term from another concept source
 Should fail if a concept reference term map has no concept map type
 Should fail if termB of a concept reference term map is not set
 Should fail if a term is mapped to itself
 Should fail if a term is mapped multiple times to the same term
 Should pass validation if field lengths are correct
 Should fail validation if field lengths are not correct
 Should pass validation if the duplicate concept reference term is retiredCopyright © 2024 OpenMRS Inc.. All rights reserved.