User Guide

A Quick Guide To Dynamic Queries with Jakarta Persistence

A Quick Guide To Dynamic Queries with Jakarta Persistence

The Jakarta Persistence API (JPA) Criteria API is a typesafe way of building dynamic entity queries programmatically.

It provides a way to create queries, enhancing readability and reducing runtime errors. This guide covers the essentials of using the Criteria API to create dynamic queries. We will cover the following topics under the API;

• Creating a query definition
• Query roots and path expressions
• The select clause
• The from clause
• The where clause
• Order by

By the end of this guide, you will have a good grasp of when and how to use the Criteria API in your Jakarta EE applications.

Category:
Subjects: , , ,

Related Resources

Explore expert tips, webinars, and product updates to help you build, deploy, and scale modern enterprise Java applications faster.

Enterprise Java Application Modernization Myths: What Enterprises Get Wrong

Enterprise Java Application Modernization Myths: What Enterprises Get Wrong

Download

How to Future-Proof Your Java Stack Migration Strategies for JBoss EAP Users

Download
Cover of the eBook titled “Scalable Enterprise Java for the Cloud” by Luqman Saeed, Otavio Santana, Michael Brey, and Dario Vega. The design features a dark blue background with teal and gold geometric accents, coral-like shapes, and cloud imagery, reflecting cloud-native enterprise Java and the Payara Community branding.

Scalable Enterprise Java for the Cloud

Download