# New Entity Class Wizard

Use to create a new entity class.

You set the following information in the wizard:

Element | Description
--- | ---
Class Name | Set the name of the entity class.
Location | Select the source folder where you want to create the entity class.
Package | Select an existing package or type the name of a new package.
Primary Key Type | Set the type of the variable you want to use as the primary key. The default type for the primary key is Long.

When you create the entity class, the IDE checks if there is a persistence unit for the project. If the IDE cannot locate a persistence unit, the Create Persistence Unit button appears. Click Create Persistence Unit to open the Create Persistence Unit wizard. Alternatively, you can create a persistence unit later by choosing Persistence > Persistence Unit in the New File wizard.

Related Topics

Developing Applications with NetBeans IDE,

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