public static interface Entity.Validator extends ValueMap.Validator<Property,Entity>, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
void |
performLengthValidation(Entity entity,
Property property)
Performs a length validation on the given string based property
|
void |
performNullValidation(Entity entity,
Property property)
Performs a null validation on the given property
|
void |
performRangeValidation(Entity entity,
Property property)
Performs a range validation on the given number based property
|
void |
validate(java.util.Collection<Entity> entities)
Validates the given Entity objects.
|
addRevalidationListener, isNullable, isValid, removeRevalidationListener, revalidate, validate, validate
void validate(java.util.Collection<Entity> entities) throws ValidationException
entities
- the entities to validateValidationException
- in case the validation failsvoid performNullValidation(Entity entity, Property property) throws NullValidationException
entity
- the entityproperty
- the propertyNullValidationException
- in case the property value is null and the property is not nullableProperty.Builder#setNullable(boolean)
,
Property.isNullable()
void performRangeValidation(Entity entity, Property property) throws RangeValidationException
entity
- the entityproperty
- the propertyRangeValidationException
- in case the value of the given property is outside the legal rangeProperty.Builder#setMax(double)
,
Property.Builder#setMin(double)
void performLengthValidation(Entity entity, Property property) throws LengthValidationException
entity
- the entityproperty
- the propertyLengthValidationException
- in case the length of the value of the given propertyProperty.Builder#setMaxLength(int)