In generated ORM code, getters and setters will be generated for attributes added to every ORM Persistable class. Sometimes, you may want to customize the method body of those getters and setters, like to apply security checking or to print a statement upon the updating of data. In these cases, you can customize the getter and setter of attribute to add the code you want.
To customize getter/setter of attribute:
- Right click on the attribute that you want to customize its getter or setting and select Open Specification… from the popup menu.
- Open the ORM Attribute Detail tab and enter the code body in Getter/Setter code sections.
When you generate code, you will see the entered code appended to the generated getter or setter.