May 2008
Intermediate to advanced
276 pages
5h 23m
English
EJB 3 provides the Java Persistence Query Language (JPQL). In this chapter we will cover:
Projections
GROUP BY and HAVING clauses
Joins
Subqueries
Dynamic Queries
Functions
Queries with parameters
Handling Date and Time
Bulk update and delete operations
Native SQL
A rather limited query language, EJB QL, was provided in EJB 2.0 and 2.1. JPQL enhances EJB QL by providing the following features: JOINs, GROUP BY, HAVING, projection, subqueries, dynamic queries, bulk update and delete. We shall see examples of all these features in this chapter.
JPQL is similar to the SQL language for querying relational databases. However, JPQL queries are expressed in Java objects rather than tables and columns. As ...
Read now
Unlock full access