Create a check operation for each
(non-derived) property in order to have a central place for
implementing all the constraints that have been defined for a property
in the design model. For a standard identifier attribute, such as
Book::isbn, two check operations are needed:
A basic check operation, such as
for checking all basic constraints of the attribute, except the
mandatory value and the
An extended check operation, such as
checkIsbnAsId, for checking, in addition to the
basic constraints, the mandatory
value and uniqueness constraints that are
required for a standard identifier attribute.
checkIsbnAsId operation is invoked on
user input for the
isbn form field in the create book form, and also in the
setIsbn method, while the
operation can be used for testing if a value satisfies the syntactic
constraints defined for an ISBN.
Create a setter operation for each (non-derived) single-valued property. In the setter, the corresponding check operation is invoked and the property is only set, if the check does not detect any constraint violation.