O'Reilly logo

Java™ Data Objects by Robin M. Roos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required