First page Back Continue Last page Graphics

Overriding Base Class Methods


Overriding Methods

In your object-specific <object name> files, you can override methods inherited from the parent class.

For example, to override a method inherited from, select the <entity name> file and select Source > Override Methods from either the main menu or the context menu, or click Override Methods in the editor toolbar. Check the methods you want to override. You can locate a method by typing its name.

dorm() method: This method fires after all of the attribute and entity validation is complete. You can add code that is beyond validation logic here. For example, you could add code that records audit information in another entity.

beforeCommit() method: This method is used for rules that involve more than one instance of the same entity or more than one entity. Because any of the instances could have changed in the current transaction, it is important to delay validation until all of the instances been posted.

remove() method: It is used for rules that are triggered by a delete action.

Overriding a method creates a skeleton code for that in the <object name> file that performs the default functionality. You can then replace or augment that code. If you prefer, you can just enter the code instead of selecting Source > Override Methods.