Please note: this project is inactive since early 2006

 
3.3 Automatic validation of referential and business-logic constraints

A major part of the checks made at runtime are validation operations -for example, you want to verify that a zipCode has a valid format, that the age of a person is a positive integer, etc.

The framework defines an interface, Validation, which allows you and the framework as well to trigger these validations when needed, in a defined scheme. You automatically get these functionalities when your class inherits from Modeling.CustomObject and corresponds to an entity defined in a model.

There is, roughly, two kinds of validation checks. The first one consists in checking individual properties of an object (such as: check that a value for a given key is of the proper type, that its width is ok if it is a 'string', etc.); the second one considers objects as a whole: its checks are like post-conditions, or consistency checking. We will see in the following how both can be adjusted and triggered.


Subsections
Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted by:SourceForge.net Logo