About CriteriaQuery

1-10 of 85Refresh
Manual
96

JPA Criteria API Queries

= em.getCriteriaBuilder(); CriteriaQuery q = cb.createQuery(Country.class); Root ... (both methods are equivalent). In the example above a CriteriaQuery instance is created for representing ... . A CriteriaQuery instance is equivalent to a JPQL string and not to a TypedQuery instance. Therefore, running
JPA Doc
82

JPA Queries

instance. Building a dynamic query using the criteria API is managed by the CriteriaQuery interface ... . The CriteriaQuery instance merely represents the query during its building, and is equivalent to a JPQL
JPA Doc
80

javax.persistence.criteria.CriteriaQuery

javax.persistence.criteria Interface CriteriaQuery Superinterfaces: AbstractQuery The CriteriaQuery interface defines functionality that is specific to top-level queries. Since: JPA 2.0 Learn ... query Since: JPA 2.0 CriteriaQuery distinct(boolean distinct) Specify whether duplicate query
JPA Doc
67

multiselect(selectionList)

Method javax.persistence.criteria.CriteriaQuery CriteriaQuery multiselect(   ListCriteriaQuery (i.e., a criteria query object created by ... of the criteria query is CriteriaQuery for some user-defined class X (i.e., a criteria query object created by
JPA Doc
67

multiselect(selectionList)

Method javax.persistence.criteria.CriteriaQuery CriteriaQuery multiselect(   ListCriteriaQuery (i.e., a criteria query object created by either the createTupleQuery ... query is CriteriaQuery for some user-defined class X (i.e., a criteria query object created by passing
JPA Doc
67

multiselect(selections)

Method javax.persistence.criteria.CriteriaQuery CriteriaQuery multiselect(   Selection ... is CriteriaQuery (i.e., a criteria query object created by either the createTupleQuery method or by passing ... that results from the query execution. If the type of the criteria query is CriteriaQuery for some user
JPA Doc
63

select(selection)

Method javax.persistence.criteria.CriteriaQuery CriteriaQuery select(   Selection selection ... . For example: CriteriaQuery q = cb.createQuery(String.class); Root order = q.from(Order.class); q.select(order.get("shippingAddress"). get("state")); CriteriaQuery q2 = cb
JPA Doc
62

createQuery(criteriaQuery)

Method javax.persistence.EntityManager TypedQuery createQuery(   CriteriaQuery criteriaQuery ) Create an instance of TypedQuery for executing a criteria query. Parameters: criteriaQuery - a criteria query object Returns: the new query instance Throws: IllegalArgumentException - if the criteria query is found to be invalid Since: JPA 2.0
JPA Doc
60

distinct(distinct)

Method javax.persistence.criteria.CriteriaQuery CriteriaQuery distinct(   boolean distinct ) Specify whether duplicate query results will be eliminated. A true value will cause duplicates to be eliminated. A false value will cause duplicates to be retained. If distinct has not been specified
JPA Doc
60

groupBy(grouping)

Method javax.persistence.criteria.CriteriaQuery CriteriaQuery groupBy(   List> grouping ) Specify the expressions that are used to form groups over the query results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any