'''[[Image:Elug_draft_icon.png|Warning]] This page is now obsolete. '''

+

+

For current information, please see "Using EclipseLink with NoSQL Databases in the ''EclipseLink Solutions Guide'': http://www.eclipse.org/eclipselink/documentation/latest/solutions/nonrelational_db.htm

Contents

Querying

Querying in NoSQL is dependent on the NoSQL platform. Some NoSQL data-sources may support dynamic querying through their own query language, others may not support querying at all.

JPQL and Criteria

EclipseLink does its best to support as much of JPQL and the Criteria API on a NoSQL platform as possible. Almost all NoSQL platforms allow querying by Id, so find() can be used to look-up objects by Id. Most NoSQL platforms also allow a find everything operation, this allows EclipseLink to support JPQL and Criteria queries that are by Id, or have no where clause.

For example:

SELECT o FROMORDER o

SELECT o FROMORDER o WHERE o.id = :id

MongoDB - JPQL and Criteria are supported with some restrictions. Joins, sub-selects, group by and certain database functions are not supported.

Oracle NoSQL - find() and JPQL and Criteria by Id or with no WHERE clause are supported.

MongoDB native query example

Interaction Queries

Internally EclipseLink uses instances of EISInteraction to execute queries. There are two main EISInteraction subclasses, MappedInteraction and XMLInteraction. Interactions are the NoSQL equivalent to SQLCall and StoredProcedureCall in the EclipseLink native API for relational databases. Interactions can contain content and properties to pass to the NoSQL adapter to execute a specific operation. Interactions can be used on EclipseLink native API DatabaseQuery, or in mapping or DescriptorQueryManager operations.

The DescriptorQueryManager contains operations for readObject, readAll, insert, update, and delete. An interaction can be defined for any of these operations to customize or define how the operation should execute. This can be done using the EclipseLink native API through a DescriptorCustomizer.