The JPA Criteria API supports dynamic definition of JPQL queries using CriteriaBuilderjavax.persistence.criteria.CriteriaBuilderJPA interfaceUsed to construct criteria queries, compound selections, expressions, predicates, orderings.See JavaDoc Reference Page... as a factory.
ObjectDB supports dynamic definition of JPQL queries as strings.
Support of the new JPA 2 Criteria API in expected in future versions.
Implementation of the JPA Criteria Query API was just added to ObjectDB in version 2.1.1_01.
It will be officially supported and documented starting version 2.2, which is expected to be released later this month.
ObjectDB version 2.2.0 was just released with full support of the JPA Criteria Query API, including complete test coverage and documentation.