Book Image

EJB 3 Developer Guide

By : Michael Sikora
Book Image

EJB 3 Developer Guide

By: Michael Sikora

Overview of this book

Table of Contents (18 chapters)
EJB 3 Developer Guide
Credits
About the Author
About the Reviewers
Preface
Annotations and Their Corresponding Packages

Summary


In this chapter we described the Java Persistence Query Language or JPQL.

JPQL is similar to the SQL language for querying relational databases. However, JPQL queries are expressed in Java objects rather than tables and columns. We looked at examples of simple queries and queries with conditional expressions using WHERE clauses. We described aggregate functions including the GROUP BY and HAVING clause.

We saw examples of joins and subqueries. JPQL provides a number of functions which may be used in the WHERE or HAVING clause of a query. Queries can also have positional or named parameters and we saw examples of these. We covered bulk update and delete operations.

Finally JPQL provides a Native SQL feature which enables one to use proprietary database SQL features such as accessing stored procedures.