Interface IDataValidation
-
public interface IDataValidationRepresents a validation rule of an entity (IMetaObject) for an attribute (IMetaPrimitive). Validation types are Required, EqualsTo, Length, Unique, RegEx and Range.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIDataValidation.ValidationTypeDefines the types of validations that exist.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IMetaPrimitivegetMetaPrimitive()Returns the attribute this data validation belongs to.IDataValidation.ValidationTypegetValidationType()Returns the type of validation.booleanisValid(IContext context, IMendixObject object, java.lang.Object value)Returns whether the specified object satisfied this data validation.
-
-
-
Method Detail
-
getMetaPrimitive
IMetaPrimitive getMetaPrimitive()
Returns the attribute this data validation belongs to.- Returns:
- the attribute
-
getValidationType
IDataValidation.ValidationType getValidationType()
Returns the type of validation.- Returns:
- the validation type
-
isValid
boolean isValid(IContext context, IMendixObject object, java.lang.Object value)
Returns whether the specified object satisfied this data validation.- Parameters:
context- the context to use for accessing the attributeobject- the Mendix object containing the attribute to validatevalue- the new value for the attribute to validate- Returns:
- true if the specified object is valid, false otherwise
-
-