© Mike Keith, Merrick Schincariol, Massimo Nardone 2018
Mike Keith, Merrick Schincariol and Massimo NardonePro JPA 2 in Java EE 8https://doi.org/10.1007/978-1-4842-3420-4_9

9. Criteria API

Mike Keith1 , Merrick Schincariol2 and Massimo Nardone3
(1)
Ottawa, Ontario, Canada
(2)
RR 3, RR 3, Almonte, Ontario, Canada
(3)
Helsinki, Finland
 

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 look at an alternate method for constructing queries that uses a Java programming language API instead of JP QL or native SQL.

We 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 is followed ...

Get Pro JPA 2 in Java EE 8: An In-Depth Guide to Java Persistence APIs 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.