CHAPTER 9
Criteria API
In the last chapter, we looked in detail at the JP QL query language and the concepts that underlie the JPA query model. In this chapter, we will look at an alternate method for constructing queries that uses a Java programming language API instead of JP QL or native SQL.
We will begin with an overview of the JPA Criteria API and look at a common use case involving constructing dynamic queries in an enterprise application. This will be followed by an in-depth exploration of the Criteria API and how it relates to JP QL.
A related feature of the Criteria API is the JPA metamodel API. We will conclude this chapter with an ...
Get Pro JPA 2, Second 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.