Book a Demo

Author Topic: PSM class model and property  (Read 3082 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1403
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
PSM class model and property
« on: September 23, 2012, 02:03:33 am »
Hi

I created 2 Java Classes : Order and Orderline
I have a 1 to many association from Order to Orderline that's named lines on the Orderline side

I need to generate the getters/setters in my Order class.
How can I achieve this, similarly to my attributes where I select the Property dialog?

thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: PSM class model and property
« Reply #1 on: September 26, 2012, 10:32:54 am »
Option 1 create a PIM and use java transformation.
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/model_transformation/javatransformation.html
You can modify the transformation to automagically do some wonderful stuff.

Option 2 Write a javascript/vbscript that adds the stuff you want to the class within the model

Option 3 Manually add the getters and setters if you are short of time and just have two classes.

Hope that helps  :)
Happy to help
:)