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. We created a NetBeans project and configured it to support JPA and accessing a Java DB database. Next, we used the NetBeans IDE’s object-relational-mapping tools to autogenerate entity classes from a 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 accessed data from multiple database tables. We discussed some of the JPA features in the autogenerated entity classes.
Next, we used transactions to insert new data in a database. We also discussed other ...
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