Class SpringValidator<T>
- java.lang.Object
- org.springframework.batch.item.validator.SpringValidator<T>
- All Implemented Interfaces:
Validator<T>,org.springframework.beans.factory.InitializingBean
public class SpringValidator<T> extends java.lang.Object implements Validator<T>, org.springframework.beans.factory.InitializingBean
Adapts theValidatorinterface toValidator.- Author:
- Tomas Slanina, Robert Kasanicky
Constructor Summary
Constructors Constructor Description SpringValidator()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voidsetValidator(org.springframework.validation.Validator validator)voidvalidate(T item)Method used to validate if the value is valid.
Method Detail
validate
public void validate(T item) throws ValidationException
Description copied from interface:ValidatorMethod used to validate if the value is valid.- Specified by:
validatein interfaceValidator<T>- Parameters:
item- object to be validated- Throws:
ValidationException- if value is not valid.- See Also:
Validator.validate(Object)
setValidator
public void setValidator(org.springframework.validation.Validator validator)
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception