Create PersonVO using ArgoUML
This page provides directions to create the PersonVO using ArgoUML. The model is
shown below for your reference.
- In the TimeTracker model create a package called vo under
org.andromda.timetracker. We will create our value objects in this package.
- Select the vo package in the Explorer pane and click the
Class Diagram icon in the Diagrams toolbar to create a new diagram in
this package.
- From the Explorer pane on the left, drag the Person class on to the diagram.
Warning: It is important to bring in the existing Person class from the domain
package into this diagram. DO NOT create a new Person class in this diagram.
Doing so will create a new class in the vo package
- this is not our intention. All we need is a reference to the existing Person
class in the domain package.
- Add a new class to the diagram and name it PersonVO.
- Add the stereotype called ValueObject to the PersonVO class.
- Add four attributes to PersonVO as shown above.
- Select the Dependency tool (dashed line with open arrowhead) from the toolbar.
Now left-click on thePerson class, drag to the PersonVO
class and release the mouse button. A dependency relationship is added between
the two classes.
- Add a new class to the diagram and name it PersonVO[].
- Make sure your class diagram matches the one shown above.
- Save the model by selecting File > Save Project.
We are now ready to generate code for the PersonVO value object. Please go back to the main
tutorial page and continue from where you left off.