OCLOperators OnCreate
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
See also: [[OCLOperators OnUpdate|OnUpdate]], [[OCLOperators OnDelete|OnDelete]], [[OnStateChange]] | See also: [[OCLOperators OnUpdate|OnUpdate]], [[OCLOperators OnDelete|OnDelete]], [[OnStateChange]] | ||
[[Category:OCL General Operators]] | [[Category:OCL General Operators]] |
Revision as of 07:33, 19 April 2023
This page was created by Peter on 2019-11-18. Last edited by Stephanie on 2025-02-06.
OnCreate is often called when a new object has been created.
It's very much like a .Net constructor for OCL.
You can use self.base.OnCreate to call the superclass's OnCreate as you would in another language.
Example
In the method body for OnCreate, set this OCL:
CreateTime:=DateTime.Now; self.Guid.newGuid()
See more: Acting on object changes
See also: OnUpdate, OnDelete, OnStateChange