Movatterモバイル変換


[0]ホーム

URL:


ObjectDBObjectDB
ObjectDB Manual

Chapter 4 - JPA Queries (JPQL / Criteria)

The JPA Query Language (JPQL) can be considered as an object oriented version of SQL. Users familiar with SQL should find JPQL very easy to learn and use. This chapter explains how to use JPQL as well as how to use the JPA Criteria API, which provides an alternative way for building queries in JPA, based on JPQL.

The first section describes the API that JPA provides for using dynamic and static (named) queries. It explains how to use the relevant interfaces, annotations, enums and methods, but does not provide specific details on the JPQL query language itself:

Query API

The Java Persistence Query Language (JPQL) is discussed in the next two sections. First, the structure of a JPQL query (and a criteria query) is explained by describing the main clauses of JPQL queries (SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY):

Query Structure

Then the expressions that are used for building JPQL and criteria query clauses are explained:

Query Expressions

ObjectDB also supports the Java Data Objects (JDO) Query Language (JDOQL), which is more Java oriented and is based on the syntax of Java. JDOQL is not covered in this manual (seechapter 7 inObjectDB 1.0 manual for a description JDOQL).

< Metamodel API^ ManualQuery API >

[8]ページ先頭

©2009-2025 Movatter.jp