Package de.xima.fc.gui.validator.name
Class AUniqueNameValidator<TEntity extends INameProviding & de.xima.cmn.dao.interfaces.IEntity<Long>>
- java.lang.Object
-
- de.xima.fc.gui.validator.name.AUniqueEntityFieldValidator<TEntity,String>
-
- de.xima.fc.gui.validator.name.AUniqueStringFieldValidator<TEntity>
-
- de.xima.fc.gui.validator.name.AUniqueNameValidator<TEntity>
-
- Type Parameters:
TEntity
- Type of the entity.
- All Implemented Interfaces:
Serializable
,EventListener
,javax.faces.validator.Validator
- Direct Known Subclasses:
UniqueActionName
,UniqueAppointmentTemplateName
,UniqueClientAuthenticatorName
,UniqueClientCounterName
,UniqueClientName
,UniqueClientResourceName
,UniqueDataSourceName
,UniqueDBConnectionName
,UniqueFrontendServerName
,UniqueInboxName
,UniqueLDAPConnectionName
,UniqueLDAPGroupName
,UniqueLDAPQueryName
,UniqueRoleName
,UniqueTemplateName
,UniqueUserGroupName
,UniqueWebDavConnectionName
,UniqueWorkflowStateNameValidator
public class AUniqueNameValidator<TEntity extends INameProviding & de.xima.cmn.dao.interfaces.IEntity<Long>> extends AUniqueStringFieldValidator<TEntity>
Attach this validator to the input field for theINameProviding.getName()
of anIEntity
. Validates whether that name is unique, that is, whether the current entity is the only one with that given name.- Author:
- XIMA MEDIA GmbH, XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.gui.validator.name.AUniqueStringFieldValidator
ignoreCase
-
Fields inherited from class de.xima.fc.gui.validator.name.AUniqueEntityFieldValidator
ATTR_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AUniqueNameValidator(Class<TEntity> entityClass)
protected
AUniqueNameValidator(Class<TEntity> entityClass, boolean ignoreCase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addSearch(de.xima.cmn.criteria.QueryCriteriaManager qcm, String name)
Adds the criteria an entity must match to be considered a duplicate.-
Methods inherited from class de.xima.fc.gui.validator.name.AUniqueStringFieldValidator
convertValue, hasValue
-
Methods inherited from class de.xima.fc.gui.validator.name.AUniqueEntityFieldValidator
addScope, createError, createError, findEntity, getValueExpressionBase, validate
-
-
-
-
Method Detail
-
addSearch
protected void addSearch(de.xima.cmn.criteria.QueryCriteriaManager qcm, String name)
Description copied from class:AUniqueEntityFieldValidator
Adds the criteria an entity must match to be considered a duplicate.- Specified by:
addSearch
in classAUniqueEntityFieldValidator<TEntity extends INameProviding & de.xima.cmn.dao.interfaces.IEntity<Long>,String>
- Parameters:
qcm
- Query criteria manager that will be used to check for existing duplicates.name
- Field to search.
-
-