29.7 Wrap-Up
In this chapter, we introduced the Java Persistence API (JPA). We used the NetBeans IDE to create and populate a Java DB database, using Java DB’s network server version, rather than the embedded version demonstrated in Chapter 24. We created NetBeans projects and added the libraries for JPA and the Java DB driver. Next, we used the NetBeans object-relational mapping tools to autogenerate entity classes from an existing database’s schema. We then used those classes to interact with the database.
We queried the databases with both dynamic queries created in code and named queries that were autogenerated by NetBeans. We used the relationships between JPA entities to access data from multiple database tables.
Next, we used JPA transactions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access