ObjectDB Database Search

1-50 of 200 results

JPA Criteria API Queries

The JPA Criteria API provides an alternative way to define JPA queries. It is useful for building dynamic queries whose structure is known only at runtime. JPA Criteria API vs. JPQL JPQL queries ... Java objects that represent query elements. A major advantage of the Criteria API is that it enables

SELECT clause (JPQL / Criteria API)

in criteria queries The criteria query API provides several ways to set the SELECT clause. Single ... it as the SELECT clause content, overriding any previously set SELECT content. Many valid criteria API expressions can be used as a selection because criteria API expressions are represented by Expression

Paths and Types in JPQL and Criteria API

, and COUNT calculates its size. Criteria query paths and types Paths and navigation are represented in the JPA Criteria API by the Path interface and its subinterfaces, such as From , Root , and Join ... using the type method of the Path interface. For example, the following criteria expression checks

ORDER BY clause (JPQL / Criteria API)

the criteria query API as follows: CriteriaQuery q = cb. createQuery (Country.class); Root c = q ... currency name. Without an ORDER BY clause, the result order would be undefined. ORDER BY in criteria ... . get ("population"))); Unlike other methods for setting criteria query clauses, the orderBy method accepts

FROM clause (JPQL / Criteria API)

criteria queries FROM query identification variables are represented in criteria queries by ... by the Join interface (and its subinterfaces). Criteria query roots The CriteriaQuery 's from method ... a criteria query by using the following code: CriteriaQuery q = cb. createQuery (Country.class); Root

WHERE clause (JPQL / Criteria API)

JPQL query: SELECT c FROM Country c WHERE c.population :p can be built using the criteria query API ... the WHERE clause. WHERE in criteria queries The CriteriaQuery interface provides two where methods for setting

Logical Operators in JPQL and Criteria API

Logical operators in JPQL and JPA criteria queries combine simple Boolean expressions to form complex expressions. Logical operators ObjectDB supports two sets of logical operators, as shown in ... for NOT . Criteria query logical operators Boolean expressions and predicates In criteria queries

Comparison in JPQL and Criteria API

Explains how comparison operators can be used in JPQL queries, including in comparing null values.

JPA Extended API Reference Guide

, criteria queries, and JPQL for data retrieval and manipulation. Describes the metamodel and graph APIs ... Jakarta Persistence API (JPA) 3.2 documentation, generated from the official JavaDoc and enriched with practical notes. It groups the API types into logical sections to help you locate core concepts

JPA Query API

because it introduces the Country class to ObjectDB. Dynamic JPQL, Criteria API , and named queries In ... Criteria API provides an alternative way to build dynamic queries. It uses Java objects that represent

JPA Query Expressions (JPQL / Criteria)

Criteria API expressions. Atomic expressions The atomic query expressions are: JPQL / Criteria Variables ... with operators and functions. Operators and functions JPQL and the Criteria API support the following ... the following pages: Detailed explanations of how to build Criteria API expressions are provided

JPA Criteria FROM and JOIN

The Jakarta Persistence Criteria API uses a specific set of interfaces to construct the FROM ... variables are represented in the Criteria API by subinterfaces of the abstract From interface: Defines ... ;with query results.  The following interfaces manage fetch operations within the Criteria API

JPA Query Structure (JPQL / Criteria)

list links to detailed explanations of how to build clauses for Criteria API queries: 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

Chapter 4 - JPA Queries (JPQL / Criteria)

and the Jakarta Persistence (JPA) Criteria Query API , which provides an alternative way to build queries in JPA. The first section describes the JPA API for running dynamic and static (named) queries ... ). The first section explains the structure of a JPQL query and a criteria query by describing the main

JPA Criteria Query Selection and Results

The JPA Criteria API provides type-safe interfaces for defining query result expressions ... of Expression , most criteria expressions can be used directly in the SELECT clause. Defines a selection ... class). For more information, see the SELECT in Criteria Queries section. ORDER BY clause elements

JPA Criteria Queries

The Jakarta Persistence (JPA) Criteria API provides a type-safe, programmatic alternative ... queries: Criteria Queries Hierarchy in Jakarta Persistence (JPA) 3.2  Instances of  ... Build top-level retrieval queries using the main criteria query interface: Use this interface

JPA Criteria Query Expressions

Jakarta Persistence (JPA) Criteria API uses a hierarchy of interfaces to model query conditions and selections, enabling the construction of dynamic, type-safe queries. These interfaces represent the building blocks for defining query logic programmatically. The hierarchy of the expression

What is the Java Persistence API (JPA)?

The Java Persistence API (JPA) is a standard API for accessing databases from within Java applications. The main advantage of JPA over JDBC (the older Java API for interacting with databases ... of the Java Persistence API (JPA). By interacting with ObjectDB using standard JPA

JPA Metamodel API

The JPA Metamodel API enables you to examine the persistent object model and retrieve details ... API is Metamodel . You can obtain an instance from either the EntityManagerFactory 's getMetamodel ... . Type interface hierarchy In the Metamodel API , types are represented by interfaces that extend the Type

ObjectDB API Reference

All about ObjectDB API Reference in Java/JPA database - explanations, examples, references, links and related information.

ObjectDB APIs

All about ObjectDB APIs in Java/JPA database - explanations, examples, references, links and related information.

Query Parameters in JPA

does not provide an API to define parameters explicitly (except when using the Criteria API ). Instead ... over ordinal parameters. Criteria Query Parameters In a JPA query built using the JPA Criteria API ... is designated for setting a parameter in a Criteria API query. The reason for having nine set methods

JPA Queries

the programmatic Criteria API . These interfaces support both static and dynamic query construction ... instructions, refer to the JPA Query API section in the ObjectDB manual. Criteria query API The Criteria API provides a factory for defining queries programmatically using Java objects

Strings in JPQL and Criteria Queries

. Criteria query string expressions Query String Expressions The JPQL string operators and functions that are described above are also available as JPA criteria query expressions. The CriteriaBuilder ... demonstrates, most methods are overloaded to support optional arguments and to accept both simple Java objects and criteria expressions.

Numbers in JPQL and Criteria Queries

type and always returns a double value. Criteria query arithmetic expressions JPQL arithmetic operators and functions (which are described above) are available also as JPA criteria query expressions ... . At least one operand must be a criteria numeric expression. The other operand can be another numeric

Date and Time in JPQL and Criteria Queries

. Date and time in criteria queries The CriteriaBuilder interface provides three factory methods ... criteria queries by using the generic CriteriaBuilder 's function method, as follows: // Create

Collections in JPQL and Criteria Queries

are synonyms. Criteria query collection expressions The JPQL collection operators and functions are also available as JPA criteria query expressions. The CriteriaBuilder interface provides factory

JPA Criteria Query Date/Time Extraction

Jakarta Persistence  criteria queries use the following interfaces and enums to extract temporal components like year, month, or hour from date and time values. TemporalField # Base interface ... a criteria query specify  the enum value that represents that component as the first argument of 

ObjectDB Object Database Features

like syntax. Query Definition and API Dynamic query definition, including using JPA Criteria Query ... support of the JPA and JDO APIs . Fundamental features of relational databases (e.g. primary keys ... database files (the ObjectDB Doctor ). Standard Persistence APIs ObjectDB is the only Object-Oriented

Literals in JPQL and Criteria Queries

of the @Entity annotation. Criteria query literals The CriteriaBuilder interface provides two factory

JPA Metamodel and Graphs

and further explanation, refer to the JPA Metamodel API section in the ObjectDB manual. Criteria query integration Integrate metamodel objects with the Criteria API using the following interface: Represents ... The Jakarta Persistence (JPA) Metamodel API provides a type-safe way to introspect the persistent

jakarta.persistence.criteria.CriteriaQuery

. Since: Jakarta Persistence (JPA) 2.0 The JPA Criteria API Queries article explains how to use ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .CriteriaQuery Type Parameters ... on the specification of the type of the criteria query object created as well as the arguments to the multiselect

jakarta.persistence.criteria.CriteriaBuilder

compatible with varags. Since: Jakarta Persistence (JPA) 2.0 The JPA Criteria API Queries article ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .CriteriaBuilder Used to construct criteria queries, compound selections, expressions, predicates, orderings. Note that Predicate

jakarta.persistence.criteria.CriteriaUpdate

The CriteriaUpdate interface defines functionality for performing bulk update operations using the Criteria API . Criteria API bulk update operations map directly to database update operations, bypassing any ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .CriteriaUpdate Type Parameters

jakarta.persistence.criteria.CriteriaDelete

The CriteriaDelete interface defines functionality for performing bulk delete operations using the Criteria API Criteria API bulk delete operations map directly to database delete operations. The persistence ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .CriteriaDelete Type Parameters

jakarta.persistence.criteria.Path

. Since: Jakarta Persistence (JPA) 2.0 The Paths and Types in JPQL and Criteria API article explains ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .Path Type Parameters: - the type ... the string-based API may need to specify the type resulting from the get operation in order to avoid

jakarta.persistence.criteria.Root

Persistence (JPA) 2.0 The FROM clause (JPQL / Criteria API ) article explains how to use Root ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .Root Type Parameters ... attribute. Note: Applications using the string-based API may need to specify the type resulting from

jakarta.persistence.criteria.Join

Persistence (JPA) 2.0 The FROM clause (JPQL / Criteria API ) article explains how to use Join . Public ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .Join Type Parameters ... attribute. Note: Applications using the string-based API may need to specify the type resulting from

jakarta.persistence.criteria.Predicate

. Since: Jakarta Persistence (JPA) 2.0 The Logical Operators in JPQL and Criteria API article explains ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .Predicate Super Interfaces: Expression , Selection , TupleElement The type of a simple or compound predicate: a conjunction or

jakarta.persistence.criteria.Order

Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .Order An object that defines an ordering over the query results. Since: Jakarta Persistence (JPA) 2.0 The ORDER BY clause (JPQL / Criteria API ) article explains how to use Order . Public Instance Methods Expression getExpression

jakarta.persistence.criteria.Selection

/ Criteria API ) article explains how to use Selection . Public Instance Methods Selection alias ... Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .Selection Type Parameters: - the type of the selection item Super Interfaces: TupleElement The Selection interface defines an item

jakarta.persistence.criteria.PluralJoin

Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .PluralJoin Type Parameters: - the source type - the element type of the collection - the collection type Super Interfaces: Join ... the string-based API may need to specify the type resulting from the Path.get operation in order

jakarta.persistence.criteria.MapJoin

Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .MapJoin Type Parameters: - the source type of the join - the type of the target Map value - the type of the target Map key Super ... -based API may need to specify the type resulting from the Path.get operation in order to avoid the use

jakarta.persistence.criteria.SetJoin

Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .SetJoin Type Parameters: - the source type of the join - the element type of the target Set Super Interfaces: PluralJoin , Join ... the string-based API may need to specify the type resulting from the Path.get operation in order to avoid

jakarta.persistence.criteria.CollectionJoin

Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .CollectionJoin Type Parameters: - the source type of the join - the element type of the target Collection Super Interfaces ... : Applications using the string-based API may need to specify the type resulting from the Path

jakarta.persistence.criteria.ListJoin

Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .ListJoin Type Parameters: - the source type of the join - the element type of the target List Super Interfaces: PluralJoin , Join ... the string-based API may need to specify the type resulting from the Path.get operation in order to avoid

jakarta.persistence.criteria.From

Jakarta Persistence (JPA) Interface jakarta.persistence. criteria .From Type Parameters: - the source type - the target type Super Interfaces: Path , FetchParent , Expression , Selection ... ) Create a path corresponding to the referenced attribute. Note: Applications using the string-based API

GROUP BY and HAVING clauses

HAVING COUNT(c) 1 can be built using the criteria query API as follows: CriteriaQuery q = cb ... are inaccessible. GROUP BY and HAVING in criteria queries The CriteriaQuery interface provides

jakarta.persistence.criteria.Path.get(String)

Jakarta Persistence (JPA) Method in jakarta.persistence. criteria .Path Path get (    String attributeName ) Create a path corresponding to the referenced attribute. Note: Applications using the string-based API may need to specify the type resulting from the Path.get operation in order

Which API should I use - JPA or JDO?

You can use ObjectDB with either the Java Persistence API (JPA) or the Java Data Objects (JDO) API ... the primary API , and if necessary, switch to JDO as a secondary API for special additional features that are supported only by JDO. Selecting the more popular API leads to more portable application