Package org.apache.openjpa.validation
Class AbstractValidator
- java.lang.Object
 - 
- org.apache.openjpa.validation.AbstractValidator
 
 
- 
- All Implemented Interfaces:
 Validator
- Direct Known Subclasses:
 ValidatorImpl
public abstract class AbstractValidator extends Object implements Validator
Abstract validation class which provides base validation methods. 
- 
- 
Constructor Summary
Constructors Constructor Description AbstractValidator() 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <T> ValidationExceptionvalidate(T arg0, int event)Validates a given instanceabstract <T> ValidationExceptionvalidateProperty(T arg0, String property, int event)Validates a property of a given instanceabstract <T> ValidationExceptionvalidateValue(Class<T> arg0, String arg1, Object arg2, int event)Validates a value based upon the constraints applied to a given class attribute.<T> booleanvalidating(T arg0, int event)Method for determining whether validation is active for the given type and event. 
 - 
 
- 
- 
Method Detail
- 
validate
public abstract <T> ValidationException validate(T arg0, int event)
Description copied from interface:ValidatorValidates a given instance 
- 
validateProperty
public abstract <T> ValidationException validateProperty(T arg0, String property, int event)
Description copied from interface:ValidatorValidates a property of a given instance- Specified by:
 validatePropertyin interfaceValidator- Type Parameters:
 T- The instance to validate- Parameters:
 arg0- The class, of type T to validateproperty- The property to validateevent- The event id- Returns:
 - ValidationException if the validator produces one or more constraint violations.
 
 
- 
validateValue
public abstract <T> ValidationException validateValue(Class<T> arg0, String arg1, Object arg2, int event)
Description copied from interface:ValidatorValidates a value based upon the constraints applied to a given class attribute.- Specified by:
 validateValuein interfaceValidator- Type Parameters:
 T- The instance type to base validation upon- Parameters:
 arg0- The class of type T to validatearg1- The property to validatearg2- The property value to validateevent- The event id- Returns:
 - ValidationException if the validator produces one or more constraint violations.
 
 
- 
validating
public <T> boolean validating(T arg0, int event)Description copied from interface:ValidatorMethod for determining whether validation is active for the given type and event.- Specified by:
 validatingin interfaceValidator- Parameters:
 arg0- Type being validatedevent- event type- Returns:
 - true if validation is active for the specified event
 
 
 - 
 
 -