Package de.xima.fc.gui.validator.name
Class AUniqueStringFieldValidator<TEntity extends de.xima.cmn.dao.interfaces.IEntity<Long>>
- java.lang.Object
-
- de.xima.fc.gui.validator.name.AUniqueBeanFieldValidator<TEntity,TField>
-
- de.xima.fc.gui.validator.name.AUniqueEntityFieldValidator<TEntity,String>
-
- de.xima.fc.gui.validator.name.AUniqueStringFieldValidator<TEntity>
-
- Type Parameters:
TEntity
- Type of the entity owning the field.
- All Implemented Interfaces:
Serializable
,EventListener
,javax.faces.validator.Validator
- Direct Known Subclasses:
AUniqueNameValidator
,UniqueUserPortalAlias
public abstract class AUniqueStringFieldValidator<TEntity extends de.xima.cmn.dao.interfaces.IEntity<Long>> extends AUniqueEntityFieldValidator<TEntity,String>
Abstract base class for faces validators that check whether a certain string field of an entity is unique amongst all existing entities within a certain scope.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
ignoreCase
-
Fields inherited from class de.xima.fc.gui.validator.name.AUniqueEntityFieldValidator
ATTR_VALUE
-
Fields inherited from class de.xima.fc.gui.validator.name.AUniqueBeanFieldValidator
beanClass, fieldClass
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AUniqueStringFieldValidator(Class<TEntity> entityClass)
protected
AUniqueStringFieldValidator(Class<TEntity> entityClass, boolean ignoreCase)
-
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.AUniqueEntityFieldValidator
addScope, addSearch, hasDuplicates
-
Methods inherited from class de.xima.fc.gui.validator.name.AUniqueBeanFieldValidator
createError, createError, findBean, getValueExpressionBase, validate
-
-
-
-
Method Detail
-
convertValue
protected final String convertValue(Object value)
- Specified by:
convertValue
in classAUniqueBeanFieldValidator<TEntity extends de.xima.cmn.dao.interfaces.IEntity<Long>,String>
- Parameters:
value
- Value as received from the UI.- Returns:
- The value, converted to the expected type.
-
hasValue
protected final boolean hasValue(String value)
- Specified by:
hasValue
in classAUniqueBeanFieldValidator<TEntity extends de.xima.cmn.dao.interfaces.IEntity<Long>,String>
- Parameters:
value
- The converted field value.- Returns:
true
if the value is non-empty, orfalse
otherwise. When empty, this validator is skipped.
-
-