About CriteriaQuery

api-jpa

javax.persistence.criteria.CriteriaQuery

The CriteriaQuery interface defines functionality that is specific to top-level queries.(Interface of JPA)

 
manual

JPA Criteria API Queries

Explains how to use the JPA Criteria API (CriteriaBuilder, CriteriaQuery, etc.) to build JPQL like queries.... Return an instance of CriteriaBuilder for the creation of CriteriaQuery objects. See JavaDoc Reference Page... ( ) ;   CriteriaQuery javax.persistence.criteria.CriteriaQuery JPA ...

 
api-jpa

JPA Queries

Reference (JavaDoc) of all the JPA query types, including Query, TypedQuery, CriteriaBuilder, CriteriaQuery, Tuple, Root, Expression, Order, etc.... query using the criteria API is managed by the  CriteriaQuery interface: javax.persistence.criteria.CriteriaQuery As noted above, eventually every criteria query is ... See JavaDoc Reference Page... instance. The CriteriaQuery javax.persistence.criteria.CriteriaQuery JPA ...

 
manual

SELECT clause (JPQL / Criteria API)

Explains how to use the SELECT clause and projections in a JPA/JPQL query.... can be built as a criteria query as follows: CriteriaQuery javax.persistence.criteria.CriteriaQuery JPA interface The CriteriaQuery interface defines ...

 
forum_thread

CriteriaQuery .where() for multiple conditions

When using the below, there appears to be an OR condition:   ... there appears to be an OR condition:   criteriaQuery. where ( criteriaBuilder. equal ( root. get ( "name" ) , name ) ) ; criteriaQuery. where ( criteriaBuilder. equal ( root. get ...

 
api-jpa

select(selection)

Specify the item that is to be returned in the query result.(Method of javax.persistence.criteria.CriteriaQuery)

 
forum_thread

CriteriaQuery using isNotNull with other conditions results in InternalException

When I try to execute the following criteria query   ... getCriteriaBuilder ( ) ; CriteriaQuery criteria = builder. createQuery ( ...

 
api-jpa

multiselect(selections)

Specify the selection items that are to be returned in the query result.(Method of javax.persistence.criteria.CriteriaQuery)

 
api-jpa

createQuery(criteriaQuery)

Create an instance of TypedQuery for executing a criteria query.(Method of javax.persistence.EntityManager)

 
forum_thread

"Unexpected query expression" using CriteriaQuery FetchParent Interface

Using the fetch over Root attribute, the exception is: com.objectdb.o._PersistenceException: Unexpected query expression end (non keyword identifier is expected) com.objectdb.o._PersistenceException.b(_PersistenceException.java:45) ... CriteriaBuilder cb = em.getCriteriaBuilder();   CriteriaQuery<Person> criteriaQuery = cb.createQuery(Person.class);   Root<Person> root = criteriaQuery.from(Person.class);   root.fetch("PersonData"); //@OneToOne ...