Create Timecard Entity
This page provides directions to create the
Timecard
entity using ArgoUML.
The model is shown below for your reference.
Follow the steps below to create the
Timecard
entity along with the
two associations.
- Select the diagram called "Domain Objects" and create a class called
Timecard
in it. Make sure the class is created in the
org.andromda.timetracker.domain
package by inspecting the tree in the explorer pane.
- Set the stereotype of the
Timecard
class to Entity.
- Add the 3 attributes as shown above.
- Add the
findByCriteria()
operation as shown above. By default the operation
is created with instance scope. Click "static" in the Modifiers section of the
property panel to change it to instance scope. You can confirm the change by
checking that the operation name is now underlined on the diagram.
- Select the association tool
from the toolbar. Create an association from
Timecard
to User.
- Double-click on the 2nd association end in the Connections field and confirm
that is the correct end by checking that the type is User. Give it
the name submitter. Set the multiplicity to 1.
- Click Other End tool
to select the other end of the association. Give this end a multiplicity of
0..1. It doesn't need a name because it's not navigable and won't be used by code.
- Similarly add an association from
Timecard
to User.
Give the first (from) end a multiplicity of 0..* and the second (to) end
the name
approver
and a multiplicity of 0..1. Move the associations
up or down as appropriate so they and their labels do not overlap each other.
- Save the model by selecting FileSave Project.
Now go back to the main tutorial page and continue from where you left off.