I’ve created a persistable class with many attributes. I’ve then added a non-persistable attribute (that would be set/get dynamically by the application) and want to create a getter and setter for it. I know how to add them to the class but I cannot figure out how to add the code to the setter and getter. Do you have to create an ORM_implementation class?
Basically, how to I implement the following generated methods:
public Integer getTotal() {
//TODO: Implement Method
throw new UnsupportedOperationException();
}
public void setTotal(int double d) {
//TODO: Implement Method
throw new UnsupportedOperationException();
}
The ‘total’ is calculated dynamically by the application which needs to setter and getter to set and access this info.
Yes, you need to use the ORM implementation class at this moment. But I think your need is quite common. I will ask our developers to see if anything we can improve to make this operation easier.
I am glad to inform you that in the coming version we will allow you generate getter and setter for non-persistable attribute, by checking Getter and Setter from the attribute specification dialog box.