public abstract class RangeValidatorSupport<T extends Comparable> extends FieldValidatorSupport
currentValue, fieldNamedefaultMessage, EMPTY_STRING, messageKey, stack, textProviderFactory| Modifier | Constructor and Description |
|---|---|
protected |
RangeValidatorSupport(Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
T |
getMax() |
T |
getMin() |
protected T |
getT(T minMax,
String minMaxExpression,
Class<T> toType) |
void |
setMax(T max) |
void |
setMaxExpression(String maxExpression) |
void |
setMin(T min) |
void |
setMinExpression(String minExpression) |
void |
validate(Object object)
The validation implementation must guarantee that setValidatorContext will
be called with a non-null ValidatorContext before validate is called.
|
protected void |
validateValue(Object object,
Comparable<T> value,
T min,
T max) |
getCurrentValue, getFieldName, getValidatorType, setFieldName, setValidatorTypeaddActionError, addFieldError, getDefaultMessage, getFieldValue, getMessage, getMessageKey, getMessageParameters, getValidatorContext, isShortCircuit, parse, setDefaultMessage, setMessageKey, setMessageParameters, setShortCircuit, setTextProviderFactory, setValidatorContext, setValueStackclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultMessage, getMessage, getMessageKey, getMessageParameters, getValidatorContext, setDefaultMessage, setMessageKey, setMessageParameters, setValidatorContext, setValueStackpublic void validate(Object object) throws ValidationException
Validatorobject - the object to be validated.ValidationException - is thrown if there is validation error(s).protected void validateValue(Object object, Comparable<T> value, T min, T max)
public void setMin(T min)
public T getMin()
public T getMax()
public void setMinExpression(String minExpression)
public void setMax(T max)
public void setMaxExpression(String maxExpression)
Copyright © 2000–2024 Apache Software Foundation. All rights reserved.