8.5. Query filter expressions

The filter expression for a query is optional. If no filter is set, the filter will be deemed to evaluate to true in all cases, and the query result will be the whole candidate collection.

Query filters are expressions that evaluate to a boolean value. They are structured as zero, one, or more boolean expressions separated by logical NOT (complement), AND, and OR operators, in that order of evaluation. Parentheses may be used to alter the default order of evaluation.

For readers well versed in formal grammars, the grammar for JDOQL is reproduced in Appendix E, in Backus-Naur Form (BNF).

8.5.1. Supported operators

Five logical operators are defined. These are listed and described in Table 8.1.

Table 8.1. Logical operators ...

Get Java™ Data Objects 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.