Fast Object Database for Java - with JPA/JDO support

Internal Website Search

1-10 of 200 resultsRefresh

Criteria Query Selection and Results

clauses and for representing query results as tuples. SELECT Clause Elements The content of the SELECT clause in a criteria query is represented by Selection: Because Selection is a super interface ... . Query Results as Tuples JPA 2 introduces a new way to represent multi selection results (i.e. results

[ODB1] Chapter 7 - JDOQL Queries

a persistent class) A filter, which is a boolean expression in a Java like syntax The query result ... is 18 or older: Query query = pm.newQuery(Person.class, "this.age >= 18"); Collection result ... (); Collection result = (Collection)query.execute(); The compile() method checks the syntax

Setting and Tuning of JPA Queries

execution if invoked before a query is run using getResultList or getSingleResult. Result Range ... window that exposes a portion of a large query result list (hiding anything outside that window ... > results = query.setFirstResult(pageIx * pageSize) .setMaxResults(pageSize

Running JPA Queries

when exactly one result object is expected. Query.getResultList - for general use in any other case ... results = query.getResultList(); Both Query and TypedQuery define a getResultList method, but the version of Query returns a result list of a raw type (non generic) instead of a parameterized

JPA Criteria API Queries

, the range variable, c, is also used in the SELECT clause as the query result expression ... ); List results = query.getResultList(); Using the criteria API introduces some extra work ... ); List results = query.getResultList(); Because eventually both types of queries

JPA Named Queries

dynamically into the query string and results in more efficient queries. @NamedQuery ... are used to instantiate them. The createNamedQuery method receives a query name and a result type ... .findAll", Country.class); List results = query.getResultList(); Another form


should be used mainly when the query result type is unknown or when a query returns polymorphic ... result type is expected queries should usually use the TypedQuery interface. It is easier to run queries and process the query results in a type safe manner when using the TypedQuery interface

Query Parameters in JPA

Query parameters enable the definition of reusable queries. Such queries can be executed with different parameter values to retrieve different results. Running the same query multiple times ... ("name", name).getSingleResult(); } The WHERE clause reduces the query results to Country objects

JPA Query Structure (JPQL / Criteria)

defines the query results. The query above simply returns all the Country objects from the iteration ... The syntax of the Java Persistence Query Language (JPQL) is very similar to the syntax of SQL. Having a SQL like syntax in JPA queries is an important advantage because SQL is a very powerful query

Date and Time in JPQL and Criteria Queries

Date and time expressions may appear in JPQL queries: as date and time literals - e.g. {d '2011-12 ... expressions - in navigation to persistent date and time fields. as results of predefined JPQL current ... that are evaluated to the date and time on the database server when the query is executed: CURRENT_DATE

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