public class IlrComparablePropertyValidator extends java.lang.Object implements IlrTypeValidator
IlrComparablePropertyValidator compares the property
it is attached to with a property specified with the
validator-compared-property annotation.
Property comparison is achieved using the constraint specified with the
validator-constraint annotation. A validator is attached to a
property using an annotation in the extension model. The property type must
implement java.lang.Comparable and must be an attribute, not a
reference. The constraint must be choosen from the enum IlrComparablePropertyValidator.Constraint.
| Modifier and Type | Class and Description |
|---|---|
static class |
IlrComparablePropertyValidator.Constraint
The list of available constraints that can be used with
IlrComparablePropertyValidator. |
| Constructor and Description |
|---|
IlrComparablePropertyValidator() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getInvalidMessage()
Gets the message that will be displayed in case
convertAndValidate returns false. |
boolean |
validate(org.eclipse.emf.ecore.EStructuralFeature property,
java.lang.Object value,
IlrCommitableObject co)
This method validates a given value of a a given committable object, given its property.
|
public boolean validate(org.eclipse.emf.ecore.EStructuralFeature property,
java.lang.Object value,
IlrCommitableObject co)
IlrTypeValidatorThe type of value corresponds to the type of property. For instance, if the property is of type int, the value is of type Integer. If the property is of type date, the value is of type Date.
validate in interface IlrTypeValidatorpublic java.lang.String getInvalidMessage()
IlrTypeValidatorconvertAndValidate returns false.
getInvalidMessage in interface IlrTypeValidator© Copyright IBM Corp. 1987, 2017