Show TOC Start of Content Area

Component documentation The JDO Query Language  Locate the document in its SAP Library structure

Purpose

The JDO Query Language (JDOQL) is a common name for an API and a query language, which enable the selection of instances of persistence capable classes based on certain filtering criteria. The JDOQL is designed to ensure data store neutrality – that is, you can use it to access data stores that support SQL or some object query language.

Features

The JDO queries are instances of the javax.jdo.Query interface. The Persistence Manager acts as a factory for queries.

A query must contain the following elements:

·        Class of the candidate instances – all objects returned as a result of the query are instances of the specified class. Sub-classes are also included.

·        Collection of candidate instances – this may be either an instance of java.util.Collection, or an Extent.

·        Query filter – this is a Boolean expression. Only the instances for which the criterion in the filter is true are returned in the result of the query.

In addition to the required elements, the query may contain optional elements as well, such as parameter declarations, parameter values, variable declarations, import statements, and ordering specifications.

See also:

Constructing and Executing Queries

Extent

JDOQL Operators

 

End of Content Area