JPOX
JPOX
 Project  |  Ver 1.1  |  Ver 1.2  |  JDO  |  JPA  |  Guides  |  Tools
1.2 | Persistence | JDO ORM | JPA ORM | Runtime | JDO Runtime | JPA Runtime | Extensions | Developer
Development
Testing
DB4O : JDOQL Implementation

JDOQL will be supported in the near future. There are a lot of things which already work. It is currently under heavy developement. JDOQL makes it possible to query for objects. Following Table shows what already works:

FunctionStatusNotes
Comparison (==, != ...)WorkingMapped to SODA
Connection (&&, ||)WorkingMapped to SODA
setOrdering()WorkingMapped to SODA
declarePrametersWorking-
setResult()WorkingSolved witd Reflection
setResultClass()WorkingSolved witd Reflection
startsWitd(), endsWitd()WorkingMapped to SODA
toUpperCase(), toLowerCase()Partial WorkingSolved with SODA-Evaluation
charAt()Partial WorkingSolved with SODA-Evaluation
indexOf()Partial WorkingSolved wiht SODA-Evaluation
substring()Partial WorkingSolved with SODA-Evaluation
length()Partial WorkingSolved with SODA-Evaulation
equals()Partial WorkingSolved with SODA-Evaluation
declareVariables()Not Working-
Support for CollectionsNot Working-
Support for MapsNot Working-


Design

There are different Classes to take care of the JDOQL-Specifications. Here are the Classes and their responsibilities. You can find all the Classes in the org.jpox.store.db4o.query package.

JDOQLQuery

This class extends AbstractJDOQLQuery. It implements Methods as performExecute(), deletePersistentAll() or shouldReturnSingleRow().

JDOQLFilterParser

Parses the String specified by setFilter. The Parser is implemented as a Recursive Descent Parser. The Parsers uses the JDOQLParser as Tokenizer. The found tokens are saved in ArrayLists (operations and arguments). If the String is not valid a Exception is thrown else a JDOQLFilterMapper is created.

JDOQLFilterMapper

Maps the Filter-Specifications with help of the ArrayLists of the JDOQLFilterParser. The setOrdering()-String is mapped here too. Also the Methods are Mapped here with the Evaluation-Mechanisme of SODA.

JDOQLResultMapper

Maps the specification of the setResult String.It also takes care of the setRange and setGrouping specifications.



Class Diagram

This Class Diagram shows the classes and the most important Methods.



Sequence Diagram

This Sequence Diagram shows whats going on by performExecute(Map map) without any grouping is set.