ObjectDB ObjectDB

Internal Website Search

141-150 of 200 resultsRefresh

Setting and Tuning of JPA Queries

since the setter methods in Query and TypedQuery support method chaining (by returning the query object ... uses automatic optimistic locking to prevent concurrent changes to entity objects by multiple users ... that has to be applied on all the result objects that the query retrieves. For example, the following query

WHERE clause (JPQL / Criteria API)

JPQL query that retrieves selective objects from the database. Out of the four optional clauses ... over all the Country objects in the database using the c range variable. Before passing these Country objects to the SELECT clause for collecting as query results, the WHERE clause gets an opportunity

Index Definition

Querying without indexes requires iteration over entity objects in the database one by one. This may take a significant amount of time if many entity objects have to be examined. Using proper indexes the iteration can be avoided and complex queries over millions of objects can be executed quickly

JPA Exceptions

JPA exceptions are represented by a hierarchy of unchecked exceptions: java.lang.Object java ... ) . For example, if a transaction fails because of an attempt to store a new entity object with a primary key that is already in use by another existing entity object, the nested exception is: Other common

Query Parameters in JPA

) The following method retrieves a Country object from the database by its name: public Country ... ("name", name).getSingleResult(); } The WHERE clause reduces the query results to Country objects ... other query elements) are represented by objects (of type ParameterExpression or its super interface

Apache License, Version 2.0, January 2004

to software source code, documentation source, and configuration files. "Object" form shall mean any form ... to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as


results and the lowest known common denominator of all the result objects is Object. When a more specific ... , the same JPQL query which retrieves all the Country objects in the database is represented by both q1 ... only Country objects), a TypedQuery is preferred. There is another advantage of using TypedQuery in

Auto Generated Values

number generator for every database. This number generator is used to generate automatic object IDs for entity objects with no primary key fields defined (as explained in the previous section). The same ... a primary key for every new entity object. These generated values are unique at the database level

Step 3: Add a Main Class

to store Point objects in the database and then retrieve them from the database. Use copy and paste ... (); // Store 1000 Point objects in the database: em.getTransaction().begin ... ); } em.getTransaction().commit(); // Find the number of Point objects in

Step 3: Add a Main Class

In this step we will add a main class to the project to store and retrieve Point objects from ... .createEntityManager(); // Store 1000 Point objects in the database: em.getTransaction().begin ... of Point objects in the database: Query q1 = em.createQuery("SELECT COUNT(p) FROM Point p

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