OCL General Operators

General Operators

To find all available operators, you can open the OCL-Editor and type in a class:

Ocl-editor 1.png

Operators Description
allInstances All the objects of the class
allinstancesAtTime All the currently loaded instances
allLoadedObjects All objects currently in memory, excluding deleted objects
allStates Meta information about available states in state machines the class may contain
allSubClasses Meta information on all the sub-classes this class has
allSuperTypes Meta information on all the super-classes – in inheritance order the class has
ASCII The set of symbols and characters used to specify constraints on objects in software development.
associationEnds Returns a collection of strings with association names for the class
associationEndsWithType Returns a collection of strings with association names and type information for the class
asString The string representation of the class – the asString operation is available on everything
asTaJson Returns a json string defined by the ViewModel
atTime Gives the read-only representation of a versioned object as it was at time X.
Attributes Meta information about what attributes the class has
BigEndianUnicode A data encoding format for Unicode characters
brokenConstraints Returns a collection of the names of broken constraints for the class and object.
canAccess Check ViewModels Access expression for root
Constraints Meta information on what constraints the class has
count Returns how many times the object is in the collection self.
Empty Used to check if a collection or string is empty or not
emptylist Returns an empty list typed to hold objects of the class
existing The existing operator returns true if the object hasn't been deleted.
externalId Returns the external ID for the object operated on.
format Used to create formatted strings based on a given pattern.
IsDirty Returns true if the objects have been changed since the last save.
IsNew IsNew operator returns true if the object has never been saved to the database.
isDirtyMember Called on a class attribute to check if this attribute has changes pending to be saved.
isNull Returns true if the value is null (not assigned any value).
maxValue Gets the maximum value in a collection of values
minValue Gets the minimum value in a collection of values
nullValue A typed null value
objectFromExternalId An external identity will be resolved to the object
oclAsType The type of the class
oclGetStates Gets a list of the objects all state machines currently state as strings.
oclIsInvalid Returns true if self is equal to *invalid*.
oclIsKindOf This is to if a class is a subclass or as the class itself and not unrelated
oclIsTypeOf Returns true if
OnCreate Is often called when a new object has been created.
OnUpdate Is called just before the object is saved to the database.
oclIsUndefined Returns true if self is equal to invalid or null.
OclType When used on an object, you get the type of the object.
random Used to generate a random value within a specified range or collection
safeCast Used to safely cast an object to a subtype.
sqlpassthrough Calls a stored procedure
sqlpassthroughobjects Return a primary key of SomeClass. This can be combined with other Ocl-PS via ->intersection or union.
superTypes Returns the set of all direct supertypes of the type.
TaggedValue Meta information on tagged values set in the class
TaggedValueOnFeature Meta information on Tagged values set on a named feature in the class
Typename The type name as a string
ViewModels A tuple with the ViewModels for this class a members

See also: https://wiki.mdriven.net/index.php/OCLOperators

This page was edited 102 days ago on 08/07/2024. What links here

Pages in category "OCL General Operators"

The following 48 pages are in this category, out of 48 total.

O