Home > Jee Code Generation

Hibernate Code Generation


To activate the Hibernate code generation you need to:
  1. Create an empty AndroMDA project and select Hibernate as the Model Layer Component
  2. Create a class diagram using Hibernate stereotype
  3. Generate Jee code from the project.uml file inside the previously created AndroMDA project

 

The AndroMDA new project creation has been explained in the JEE code generation part.
In order to create a class diagram using EJB stereotype, you need to open the diagram contextual menu and select PSM Preferences > Layer Component > Hibernate

 

 

The Hibernate modeling menu will then be available in the toolbar

 


And also in the class diagram contextual menu

 
After all the Hibernate business logic has been modeled, select your project.uml file in the package explorer
JEE UML Code Generation > Build All Components (with EclipseUML 3.3 and EclipseUML 3.4)

or

Click on the EclipseUML model in the Package Explorer Project name.uml file  > Transform to AndroMDA (with the latest EclipseUML builds)