Chapter 10. Using the query API and JPQL to retrieve entities
This chapter covers
- Creating and executing queries
- The Java Persistence Query Language
- Using SQL queries
Chapters 8 and 9 discussed how the EJB 3 Java Persistence API (JPA) O/R mapping mechanism shields developers from having to write SQL to directly manipulate data. Chapter 8 explained how to map entities to relational tables, and chapter 9 revealed how to manipulate those entities using the EntityManager API. The next couple of topics we’ll tackle in our quest for JPA mastery are the query API and the Java Persistence Query Language (JPQL). We’ll continue to use ActionBazaar to explore these new concepts, incorporating JPQL into our auction system as well as looking at how the ...
Get EJB 3 in Action 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.