OCLOperators constraints
No edit summary
No edit summary
Line 1: Line 1:
Meta information on what constraints the class has
The operator return both meta information about a class's constraints and if it's currently broken.
 
The return value is a collection of [[Tuple]] containing the following
 
Name
 
Description
 
IsDeleteConstraint: True/False
 
ErrorLevel: #Information, #Warning or #Error
 
Broken:Evaluated and [[Subscribed]] state of the constraint.
 
To check is any constraint with error level '''Error''' is broken;
self.constraints->select(c|c.ErrorLevel = #Error)->forAll(c|not c.Broken)
 
'''Please note:''' This operator earlier resulted in a array of constraint names. To get the same functionality now, and .name to the end of the previous expression.
 
Like this;
self.constraints.name
[[Category:OCLOperators]]
[[Category:OCLOperators]]

Revision as of 14:11, 14 December 2018

The operator return both meta information about a class's constraints and if it's currently broken.

The return value is a collection of Tuple containing the following

Name

Description

IsDeleteConstraint: True/False

ErrorLevel: #Information, #Warning or #Error

Broken:Evaluated and Subscribed state of the constraint.

To check is any constraint with error level Error is broken;

self.constraints->select(c|c.ErrorLevel = #Error)->forAll(c|not c.Broken)

Please note: This operator earlier resulted in a array of constraint names. To get the same functionality now, and .name to the end of the previous expression.

Like this;

self.constraints.name
This page was edited 101 days ago on 02/10/2024. What links here