Hibernate Mapping Files and POJOs Wizard: Generation of Code
See Also
The Hibernate Mapping Files and POJOs from Database wizard enables you
to specify tables in a database and generate mapping files and POJOs based on the database tables.
If you do not want to use the Hibernate mapping files,
the wizard gives you the option of creating classes that use annotations for the mapping information.
You can also choose to generate only the Hibernate mapping files.
The Generation of Code page of the wizard enables you to specify the options
for generating the mapping files and POJOs.
In this page you can specify the following options:
- General Settings.
The General Settings apply to the code of the generated POJOs.
- JDK 5 Language Features. When selected the generated code will take advantage of
Java language features such as generics and static imports that are supported by JDK 5.
- EJB 3 Annotations. When selected the generated POJOs use
annotations for mapping information.
- Code Generation Settings.
The Code Generation Settings determine which files are generated.
- Domain Code (.java). When selected the IDE generates a POJO for each of the
tables you specified in the wizard.
When deselected no POJOs are generated.
- Hibernate XML Mappings (.hbm.xml). When selected the IDE generates a mapping file
(.hbm.xml) for each of the tables you specified in the wizard.
When deselected no mapping files are generated.
- If you deselect both options the IDE will only generate the hibernate.reveng file.
- Project. Specifies the name of the project. (read only)
- Location. Specifies the location of the package containing the generated mapping files and POJOs.
- Package. Specified the name of the package where the mapping files and POJOs are created.
Select an existing package from the drop down list or type the name of a new package.
When you click Finish, the IDE generates the files you selected in the Code Generation Settings.
The IDE also generates the hibernate.reveng reverse engineering file
in the location you specified in the first page of the wizard.
The hibernate.reveng is not necessary for compiling your project and can be deleted if desired.
- See Also
- Generating Hibernate Mapping Files and POJOs from a Database
- Working with Hibernate
- Creating the Hibernate Configuration File
- About Hibernate Support
- Connecting to a Database
Legal Notices