Fast Object Database for Java - with JPA/JDO support

Internal Website Search

21-30 of 200 resultsRefresh

JPA Annotations for JPQL Queries

The following annotations are used to define static named JPA queries: The JPA Named Queries section of the ObjectDB Manual explains and demonstrates how to use these annotations to define named JPQL queries.

Criteria Query Expressions

The following interfaces are in use in representing general expressions in criteria queries: See the Query Expressions section for more details and examples.

JPA Annotations for SQL Queries

The following JPA annotations are designated for SQL queries on relational databases: ObjectDB supports only the preferred JPA query language, JPQL, and silently ignores all the above annotations.


javax.jdo Interface Query Superinterfaces: Serializable The Query interface allows applications ... is the factory for Query instances. There may be many Query instances associated with a PersistenceManager. Multiple queries might be executed simultaneously by different threads


javax.persistence Interface Query Subinterfaces: TypedQuery Interface used to control query execution. Since: JPA 1.0 See Also: TypedQuery Parameter Learn how to define and use JPA/JPQL queries in ... : IllegalStateException - if called for a Java Persistence query language SELECT statement or for a criteria

FROM clause (JPQL / Criteria API)

The FROM clause declares query identification variables that represent iteration over objects in the database. A query identification variable is similar to a variable of a Java enhanced for loop in a program, since both are used for iteration over objects. Range Variables Range variables are query

SELECT clause (JPQL / Criteria API)

, the following query returns Country objects that become managed by the EntityManager em: TypedQuery query = em.createQuery("SELECT c FROM Country c", Country.class); List results = query.getResultList(); Because the results are managed entity objects they have all the support


javax.jdo.annotations Annotation Query Target: Classes Annotation for a named query. Corresponds to the xml element "query". Since: JDO 2.1 Extension[] extensions Vendor extensions. Vendor extensions ... of the fetch plan used by this query The name of the fetch plan used by this query Returns: the fetch plan

addSubquery(sub, variableDeclaration, candidateCollectionExpression, parameters)

Method javax.jdo.Query void addSubquery( Query sub, String variableDeclaration, String candidateCollectionExpression, String... parameters ) Add a subquery to this query. A subquery is composed as a Query and subsequently attached to a different query (the outer query) by calling this method


Method javax.persistence.Query Query setLockMode( LockModeType lockMode ) Set the lock mode type to be used for the query execution. Parameters: lockMode - lock mode Returns: the same query instance Throws: IllegalStateException - if the query is found not to be a Java Persistence query language SELECT query or a Criteria API query Since: JPA 2.0

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support