ObjectDB ObjectDB

Internal Website Search

1-10 of 200 resultsRefresh
63

JPA Criteria API Queries

The JPA Criteria API provides an alternative way for defining JPA queries, which is mainly useful for building dynamic queries whose exact structure is only known at runtime. JPA Criteria API vs JPQL JPQL queries are defined as strings, similarly to SQL. JPA criteria queries, on the other hand
59

FROM clause (JPQL / Criteria API)

and aBs are all invalid variable names. FROM and JOIN in Criteria Queries FROM query identification variables are represented in criteria queries by sub interfaces of From: Range variables ... interfaces). Criteria Query Roots The CriteriaQuery's from method serves as a factory of Root instances
58

Criteria Query Selection and Results

The JPA Criteria API interfaces in this group are used for setting the SELECT and ORDER BY clauses ... clause in a criteria query is represented by Selection: Because Selection is a super interface of Expression, any criteria expression can be used as the SELECT clause content. Multiple selection
58

SELECT clause (JPQL / Criteria API)

, depending on the size of the query result list and other factors. SELECT in Criteria Queries The criteria query API provides several ways for setting the SELECT clause. Single Selection Setting ... DISTINCT c.currency FROM Country c can be built as a criteria query as follows: CriteriaQuery
58

JPA Query Expressions (JPQL / Criteria)

Query expressions are the foundations on which JPQL and criteria queries are built. Every query ... of JPQL / Criteria query expressions. Atomic Expressions The atomic query expressions are: JPQL / Criteria Variables JPQL / Criteria Parameters JPQL / Criteria Literals Every query expression consists
57

JPA Query Structure (JPQL / Criteria)

on how to set criteria query clauses are provided as follows: Criteria SELECT (select, distinct, multiselect, array, tuple, construct). Criteria FROM (from, join, fetch). Criteria WHERE (where). Criteria GROUP BY / HAVING (groupBy, having, count, sum, avg, min, max, ...). Criteria ORDER BY (orderBy, Order, asc, desc).
57

Criteria Query From Elements

The interfaces in this group are in use for setting a criteria query FROM clause. Criteria Query ... are represented in criteria queries by descendant interfaces of the From interface: Range variables ... and its descendant interfaces: See the FROM in Criteria Queries section for more details and examples. Join
56

WHERE clause (JPQL / Criteria API)

but they are especially dominant in the WHERE clause. WHERE in Criteria Queries The CriteriaQuery interface ... .population > :p can be built by using the criteria query API as follows: CriteriaQuery<Country> q = cb ... .area < :a can be built as a criteria query as follows: CriteriaQuery q = cb.createQuery(Country
56

Comparison in JPQL and Criteria API

> :max Criteria Query Comparison JPQL comparison operators (which are described above) are available also as JPA criteria query expressions. The CriteriaBuilder interface provides factory methods ... of every one of these methods is a criteria expression. The second argument (and the third argument in between
56

Paths and Types in JPQL and Criteria API

one group, and COUNT calculates its size). Criteria Query Paths and Types Paths and navigations are represented in the JPA Criteria API by the Path interface and by its subinterfaces (From, Root, Join ... type method. For example, the following criteria expression checks if the type of a specified entity e

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