@Handler(supports=OrderFrequency.class) public class OrderFrequencyValidator extends Object implements org.springframework.validation.Validator
OrderFrequency
class.Constructor and Description |
---|
OrderFrequencyValidator() |
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 the order frequency object for any inconsistencies/errors
|
public boolean supports(Class<?> c)
supports
in interface org.springframework.validation.Validator
Validator.supports(java.lang.Class)
public void validate(Object obj, org.springframework.validation.Errors errors)
validate
in interface org.springframework.validation.Validator
Should fail if orderFrequency is null
Should fail if concept is null
Should fail if the concept is not of class frequency
Should fail if concept is used by another frequency
Should pass for a valid new order frequency
Should pass for a valid existing order frequency
Should be invoked when an order frequency is saved
Should pass validation if field lengths are correct
Should fail validation if field lengths are not correct
Copyright © 2024 OpenMRS Inc.. All rights reserved.