This page provides directions to create the PersonVO using MagicDraw. The model is shown below for your reference.
vo
under
org.andromda.timetracker
. We will create our value objects in this package.vo
package and select
New Diagram > Class Diagram. Type in Value Objects as the name of this diagram
and click OK. The diagram is created and opened in a new window.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.PersonVO
.PersonVO
.PersonVO
as shown above.Person
class, drag it to the PersonVO
class and release
the mouse. A dependency relationship is added between the two classes.PersonVO[]
.
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.