ObjectDB ObjectDB

JPA Query Expressions (JPQL / Criteria)

Query expressions are the foundations on which JPQL and criteria queries are built.

Every query consists of clauses - SELECT, FROM, WHERE, GROUP BY, HAVING and ORDER BY, and each clause consists of JPQL / Criteria query expressions.

Atomic Expressions

The atomic query expressions are:

Every query expression consists of at least one atomic component. More complex query expressions are built by combining atomic expressions with operators and functions.

Operators and Functions

JPQL / Criteria queries support the following operators (in order of decreasing precedence):

In addition, JPA queries support predefined functions, which are also described in this section.

Organization of this Section

This section contains the following pages:

Detailed explanations on how to build criteria query expressions are provided as follows: