| Author |
Message |
|
2006/11/21 01:48
|
|
|
jvence
Joined: 2005/09/15
Messages: 17
Offline
|
|
|
|
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.
Jean
|
|
|
|
 |
| |
|
2006/11/21 08:31
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
Hi jvence,
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.
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2007/02/24 10:58
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
Hi jvence,
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.
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2007/03/06 09:12
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
hi jvence,
I am glad to inform you that VP Suite 3.0 Service Pack 1 is released. You can generate getter and setter by:
1. Right-click on an attribute and select Attribute Specification from the popup menu
2. Check Getter and/or Setter
3. Confirm changes
4. Generate code.
Hope this helps. Please feel free to contact me if there are any questions.
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |