O/R Mapping
Mac OS X
Tips and Tricks
UML Diagrams
VP Suite
Change Log

Reverse Engineering Hibernate Model to Object Model

VP’s products allow you to reverse engineer not only the Java classes, but also the hibernate model to object model with ORM-Persistable stereotyped. The database configuration is also reverse engineered as the database setting is defined in the hibernate model.

Reverse Engineering Hibernate Model

To reverse engineer Hibernate model:

  1. On the menu, click Tools > Object-Relational Mapping (ORM) > Reverse Hibernate....
    reverse_engineer_hibernate-1.jpg

    The Reverse Hibernate Model dialog box is displayed.
    reverse_engineer_hibernate-2.jpg

  2. Select the path of the Hibernate xml files by using the button.
  3. Select the type of reverse engineering to be performed from the drop-down menu of Reverse, either Configuration and Mapping, Configuration only or Mapping only.
    reverse_engineer_hibernate-3.jpg

  4. Click OK. The hibernate model are reverse engineered to class models and entities which can be found under the Model tree.
    reverse_engineer_hibernate-4.jpg

View Mapping between Reversed Object Model and Data Model

After reverse engineered the hibernate model, you can use an ORM diagram to view the mapping between the reversed classes and entities. For more detailed information on ORM diagram, please read Using ORM Diagram and Showing Object-Relational Mapping between Object and Data Models.

  1. Create a new ORM diagram by using the New ORM Diagram icon.
    reverse_engineer_hibernate-5.jpg

  2. Add the reversed classes to the ORM diagram by dragging the class models from the Model tree to the ORM diagram.
    reverse_engineer_hibernate-6.jpg

  3. Drag the entities from the Model tree to the ORM diagram to add the entities to the ORM diagram.
    reverse_engineer_hibernate-7.jpg

  4. Right-click the ORM diagram, select View > Attribute Mapping from the pop-up menu.
    reverse_engineer_hibernate-8.jpg

    The mapping between the attributes of class models and columns of entities are shown.
    reverse_engineer_hibernate-9.jpg

Showing Reverse Engineered Database Configuration

You can also check the reversed engineered database connection by the following steps:

  1. Click the Database Configuration icon, to open the Database Configuration dialog box.
    reverse_engineer_hibernate-10.jpg

  2. Select the connected database from the Database Configuration dialog box, the Database Setting is shown which shows the database configuration has been reversed successfully.
    reverse_engineer_hibernate-11.jpg

Related Articles

Resources

 
 
Last modified: 2006/03/20 23:15
 
 
Home | Recent Topics | Highlights | UML Diagrams | Tips and Tricks | Object-Relational Mapping
visual-paradigm.com Home | Training Center | UML Center | VP Gallery | Discussion Forum | UML Open Directory