Package org.springframework.batch.item.validator

# 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 Object implements Validator<T>, org.springframework.beans.factory.InitializingBean
Adapts the `Validator` interface to `Validator`.

Author:
  Tomas Slanina, Robert Kasanicky

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SpringValidator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `afterPropertiesSet()`
  `void`
  `setValidator(org.springframework.validation.Validator validator)`
  `void`
  `validate(T item)`
  Method used to validate if the value is valid.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SpringValidator

    public SpringValidator()

- ## Method Details

  - ### validate

    public void validate(T item) throws ValidationException
    Description copied from interface: `Validator`
    Method used to validate if the value is valid.
    Specified by:
      `validate` in interface `Validator<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 Exception
    Specified by:
      `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
    Throws:
      `Exception`