# Persistent entity

An Entity is a persistent domain object.

An entity can be:

- Abstract or concrete classes. Entities may also extend non-entity classes as well as entity classes, and non-entity classes may extend entity classes.

An entity must have:

- A no-arg constructor (public or protected); the entity class may have other constructors as well.

Each persistent entity must be mapped to a database table and contain a primary key. Persistent entities are identified by the `@Entity` annotation.

Use this procedure to add persistence to an existing entity:

1. Right-click the class in the Package Explorer and select Java Persistence > Make Java Persistence Entity.

   Adding Persistence to a Class

2. In the Persistence Properties view, use the Map As drop-list to select Entity.

   Selecting Entity Persistence

3. Complete the remaining Persistence Properties view (for entities).

Adding persistence to a class