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 ...