EJB Query Language (EJB QL) was introduced in the EJB 2 specification to make CMP Entity beans more portable across EJB containers. Previously, each EJB container vendor created their own proprietary mechanism for specifying the semantics of finder methods. This is no longer the case.
As a language, EJB QL is based on ANSI SQL and bears some similarity with the Object Constraint Language (OCL) that is part of UML.
Syntax and Examples
The EJB Specification formally defines the syntax of EJB QL queries using Bacchus Normal Form (BNF). This can be somewhat heavy to wade through, but is comprehensive. Rather than reproduce the specification (and to keep things simple), this section introduces EJB QL using examples. You should refer to the ...