29.2 JPA Technology Overview

When using JPA in this chapter, you’ll interact with an existing database via classes that the NetBeans IDE generates from the database’s schema. Though we do not do so in this chapter, it’s also possible for you to create such classes from scratch and use JPA annotations that enable those classes to create corresponding tables in a database.

29.2.1 Generated Entity Classes

In Section 29.3.5, you’ll use the NetBeans Entity Classes from Database… option to add to your project classes that represent the database tables. Together, these classes and the corresponding settings are known as a persistence unit. The discussion in this section is based on the books database that we introduced in Section 24.3.

For the

Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.