Package de.espirit.or.schema
Interface Validator<T>
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
EntityValidator
Provides information about constraints on an attribute.
NOT USED
NOT USED
- Since:
- 5.2.210803
-
Method Summary
Modifier and TypeMethodDescriptioncheckValidity(Entity owner, Attribute<T> attribute, T value) Check the validity of the given value against this constraint.booleanReturns whether or not anullvalue is allowed.booleanCheck the validity of the given value against this constraint.
-
Method Details
-
isValid
Check the validity of the given value against this constraint.- Returns:
trueif no constraint is violated, elsefalse.- Since:
- 5.2.210803
-
checkValidity
Check the validity of the given value against this constraint. The constraint may choose to modify the value or return a corrected value.- Parameters:
owner- the entity where the value should be setattribute- the owning attribute where this constraints belongs tovalue- the value which should be set- Returns:
- the value itself or corrected value which then will be used to update the entity
- Throws:
IllegalArgumentException- when a constraint is violated. The exception message contains a descriptive explanation.- Since:
- 5.2.210803
-
isNullAllowed
boolean isNullAllowed()Returns whether or not anullvalue is allowed.- Returns:
trueif anullvalue is allowed,falseotherwise.- Since:
- 5.2.210803
-