Create User Entity

This page provides directions to create the User entity using RSM.

We will create User in a package named org.andromda.timetracker.domain.

  1. In the TimeTracker model create a package called domain under org.andromda.timetracker.
  2. In the Containment Tree on the left, right-click on the domain package and selectNew Diagram > Class Diagram. The diagram is created and opened in a new window. Type in Domain Objects as the name of this diagram and press Enter.
  3. Add a new class to the diagram and name it User.
  4. Add the stereotype called Entity to User.
  5. Add the 3 attributes to User.
  6. Open the Stereotype tab and apply the stereotype named andromda_persistence_table. At the bottom of the stereotype panel, you'll find the Stereotype's properties table. On the right of andromda_persistence_table, Enter the value USERS. This tagged value allows you to override the default table name for the entity.
  7. Note: In our EMF-UML2 profile, each tag value has it own stereotype. Having such a stereotype applied on an element will make AndroMDA consider this element tagged by the corresponding tag value. If there is no specified value (but the stereotype is applied) AndroMDA will use the default value, defined in the profile. Keep this in mind, to remove a tag value, unapply the stereotype.
  8. Make sure your class diagram matches the one shown on the right.
  9. Make sure that the RSM model explorer matches the screen shot shown below.
  10. Save your timetracker model by double-clicking on timetracker.emx and clicking on File > Save (Ctrl + S).
  11. SelectFile > Export.... Choose UML2 Model and then click onNext. As source select /TimeTracker/timetracker.emx and as destination browse to C:\timetracker\mda\src\main\uml.

Now go back to the main tutorial page and continue from where you left off.