13.5. EJB QL overview

EJB QL is defined in detail in the EJB Specification [EJB2.0 11], which includes some relatively helpful examples, so only a basic introduction will be given here. Some practical examples from the Prestige Bike Hire application are described later in the chapter.

13.5.1. Structure of an EJB QL query

EJB QL is superficially similar to SQL, for obvious reasons, but has only ‘SELECT’ functionality. There are no ‘UPDATE’, ‘INSERT’, or ‘DELETE’ operations in EJB QL. In fact, EJB QL reflects the smallest common subset of common SQL SELECT operations. All relational databases will offer functionality that is inexpressible in EJB QL; this issue is an important one, and we will return to it later.

EJB QL queries all have the following ...

Get Applied Enterprise JavaBeans™ Technology 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.