Hibernate Mapping Files and POJOs Wizard: Generation of Code

Use to specify the options for generating the mapping files and POJOs.

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.

You must have the following to complete this wizard:

In this page you can specify the following options:

Element Description

Hibernate Configuration File

Select the configuration file from the drop-down list.

Reverse Engineering File

Select the reverse engineering file from the drop-down list.

General Settings

Apply general settings 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, generate 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, generate 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

(Read only) Specify the name of the project.

Location

Specify the location of the package containing the generated mapping files and POJOs.

Package

Specify 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.



Related Topics

Developing Applications with NetBeans IDE,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.