Package de.xima.fc.gui.validator.name
Class AUniqueBeanStringFieldValidator<TBean>
- java.lang.Object
-
- de.xima.fc.gui.validator.name.AUniqueBeanFieldValidator<TBean,String>
-
- de.xima.fc.gui.validator.name.AUniqueBeanStringFieldValidator<TBean>
-
- Type Parameters:
TBean
- Type of the bean owning the field.
- All Implemented Interfaces:
Serializable
,EventListener
,javax.faces.validator.Validator
- Direct Known Subclasses:
UniqueUserPortalViewModelAliasValidator
,UniqueUserPortalViewModelNameValidator
public abstract class AUniqueBeanStringFieldValidator<TBean> extends AUniqueBeanFieldValidator<TBean,String>
Abstract base class for faces validators that check whether a certain string field of a bean is unique amongst all existing entities (within a certain scope).- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.gui.validator.name.AUniqueBeanFieldValidator
ATTR_VALUE, beanClass, fieldClass
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AUniqueBeanStringFieldValidator(Class<TBean> beanClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
convertValue(Object value)
protected boolean
hasValue(String value)
-
Methods inherited from class de.xima.fc.gui.validator.name.AUniqueBeanFieldValidator
createError, createError, findBean, getValueExpressionBase, hasDuplicates, validate
-
-
-
-
Method Detail
-
convertValue
protected String convertValue(Object value)
- Specified by:
convertValue
in classAUniqueBeanFieldValidator<TBean,String>
- Parameters:
value
- Value as received from the UI.- Returns:
- The value, converted to the expected type.
-
hasValue
protected boolean hasValue(String value)
- Specified by:
hasValue
in classAUniqueBeanFieldValidator<TBean,String>
- Parameters:
value
- The converted field value.- Returns:
true
if the value is non-empty, orfalse
otherwise. When empty, this validator is skipped.
-
-