# Adding persistence to a class

You can make a Java class into one of the following persistent types:

- Entity

- Embeddable

- Mapped superclass

To add persistence to an existing Java class:

1. Right-click the class in the Project Explorer and select JPA Tools > Make Persistent. The Make Persistent dialog appears.

   Make Persistence Dialog

2. Complete the fields on the Make Persistent dialog, specify the persistence mapping for each class, and click Finish.

Dali adds the necessary annotation or entry in the XML mapping file for the class.

Related reference

- Specifying additional tables

- Specifying entity inheritance

- Mapping an entity

Related concepts

- Understanding Java persistence

- The orm.xml file

- The persistence.xml file