O'Reilly logo

EJB 3 in Action, Second Edition by Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. JPQL

This chapter covers

  • Creating and executing queries
  • The Java Persistence Query Language
  • Leveraging the criteria API
  • Using SQL queries
  • Invoking stored procedures

Chapter 10 introduced the basics of the EntityManager API. You saw how to get an instance of EntityManager from the container and use it to perform the basic CRUD operations (create, read, update, delete) on entities. Create, update, and delete are relatively simple operations that chapter 10 covered in full. Read, however, is much more complicated because of the variety of ways to query database data.

In this chapter we’ll explore read in depth by looking at the Java Persistence Query Language (JPQL), the criteria API, and native SQL. Each method tackles the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required