Expressions

Cayenne defines a simple yet powerful object-based expression language. Cayenne expressions are database independent and are used as query qualifiers and orderings and also to perform in-memory evaluation with DataObjects (and generally any kind of Java Beans). BNF of Cayenne expression language is described here.

Expressions are broadly divided into the following categories: object property expressions (also called "path expressions"), arithmetic operations, and conditional expressions. Cayenne contains a parser to build expressions from strings, and also features explicit expression API. Various ways of creating and using expressions are described later in this chapter.

Sections

  1. Path Expressions
  2. Building Expressions
  3. Expression Factory Utilities
  4. NULL Handling
  5. In-Memory Evaluation
  6. BNF for ExpressionParser