Purpose: Contains the implementation of the CriteriaQuery interface of the JPA criteria API.
Description: This is the container class for the components that define a query.
CriteriaQuery
| Modifier and Type | Field and Description |
|---|---|
| protected Set | |
| protected List | |
| protected SelectionImpl |
| Access | Constructor and Description |
|---|---|
| public | CriteriaQueryImpl(Metamodel metamodel, AbstractQueryImpl.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addJoin(FromImpl<Z, X> from)
Implements abstract org. |
| protected ObjectLevelReadQuery | |
| protected ObjectLevelReadQuery | |
| public CriteriaQuery | Returns: the modified query.boolean value specifying whether duplicate results must be
eliminated from the query result or whether they must be
retained distinct)Overrides org. Implements jakarta. |
| protected DatabaseQuery | |
| public List | Returns: the list of ordering expressionsImplements jakarta. |
| public Selection | Returns: the selection item of the queryImplements jakarta. |
| public CriteriaQuery | Returns: the modified queryzero or more grouping expressions grouping)Overrides org. Implements jakarta. |
| public CriteriaQuery | Returns: the modified querylist of zero or more grouping expressions grouping)Overrides org. Implements jakarta. |
| public CriteriaQuery | Returns: the modified querya simple or compound boolean expression restriction)Overrides org. Implements jakarta. |
| public CriteriaQuery | Returns: the modified queryzero or more restriction predicates restrictions)Overrides org. Implements jakarta. |
| public CriteriaQuery | Returns: the modified queryexpressions specifying the items that are to be returned in
the query result selections)Implements jakarta. |
| public CriteriaQuery | Returns: the modified querylist of expressions specifying the items that to be are
returned in the query result selectionList)Implements jakarta. |
| public CriteriaQuery | Returns: the modified query.zero or more ordering expressions o)Implements jakarta. |
| public CriteriaQuery | Returns: the modified query.list of zero or more ordering expressions o)Implements jakarta. |
| public void | populateAndSetConstructorSelection(ConstructorSelectionImpl constructorSelection, Class<?> class1, Selection<?>... selections)
This method will set this queryImpl's selection to a ConstructorSelectionImpl, creating a new instance or populating the one passed in as necessary. |
| public CriteriaQuery | Returns: the modified queryselection specifying the item that is to be returned in the
query result selection)Implements jakarta. |
| public DatabaseQuery | translate()
Overrides org. |
| public CriteriaQuery | Returns: the modified querya simple or compound boolean expression restriction)Overrides org. Implements jakarta. |
| public CriteriaQuery | Returns: the modified queryzero or more restriction predicates restrictions)Overrides org. Implements jakarta. |
| joins | back to summary |
|---|---|
| protected Set<FromImpl<Z, X>> joins | |
| orderBy | back to summary |
|---|---|
| protected List<Order> orderBy | |
| selection | back to summary |
|---|---|
| protected SelectionImpl<?> selection | |
| CriteriaQueryImpl | back to summary |
|---|---|
| public CriteriaQueryImpl(Metamodel metamodel, AbstractQueryImpl. | |
| addJoin | back to summary |
|---|---|
| public void addJoin(FromImpl<Z, X> from) Implements abstract org.
| |
| createCompoundQuery | back to summary |
|---|---|
| protected ObjectLevelReadQuery createCompoundQuery() Translates from the criteria query to a EclipseLink Database Query.
| |
| createSimpleQuery | back to summary |
|---|---|
| protected ObjectLevelReadQuery createSimpleQuery() | |
| distinct | back to summary |
|---|---|
| public CriteriaQuery Overrides org. Implements jakarta. 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, duplicate results must be retained. This method only overrides the return type of the corresponding AbstractQuery method.
| |
| getDatabaseQuery | back to summary |
|---|---|
| protected DatabaseQuery getDatabaseQuery() Implements abstract org.
| |
| getOrderList | back to summary |
|---|---|
| public List Implements jakarta. Return the ordering expressions in order of precedence. | |
| getSelection | back to summary |
|---|---|
| public Selection Implements jakarta. Return the selection item of the query. This will correspond to the query type. | |
| groupBy | back to summary |
|---|---|
| public CriteriaQuery Overrides org. Implements jakarta. 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 previously added grouping expressions are simply removed. This method only overrides the return type of the corresponding AbstractQuery method.
| |
| groupBy | back to summary |
|---|---|
| public CriteriaQuery Overrides org. Implements jakarta. 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 previously added grouping expressions are simply removed. This method only overrides the return type of the corresponding AbstractQuery method.
| |
| having | back to summary |
|---|---|
| public CriteriaQuery Overrides org. Implements jakarta. Specify a restriction over the groups of the query. Replaces the previous having restriction(s), if any. This method only overrides the return type of the corresponding AbstractQuery method.
| |
| having | back to summary |
|---|---|
| public CriteriaQuery Overrides org. Implements jakarta. Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed. This method only overrides the return type of the corresponding AbstractQuery method.
| |
| multiselect | back to summary |
|---|---|
| public CriteriaQuery Implements jakarta. Specify the items that are to be returned in the query result. Replaces the previously specified selection(s), if any. The type of the result of the query execution depends on the specification of the criteria query object as well as the arguments to the multiselect method as follows: If the type of the criteria query is CriteriaQuery<Tuple>, a Tuple object corresponding to the arguments of the multiselect method will be instantiated and returned for each row that results from the query execution. If the type of the criteria query is CriteriaQuery<X> for some user-defined class X, then the arguments to the multiselect method will be passed to the X constructor and an instance of type X will be returned for each row. The IllegalStateException will be thrown if a constructor for the given argument types does not exist. If the type of the criteria query is CriteriaQuery<X[]> for some class X, an instance of type X[] will be returned for each row. The elements of the array will correspond to the arguments of the multiselect method. The IllegalStateException will be thrown if the arguments to the multiselect method are not of type X. If the type of the criteria query is CriteriaQuery<Object>, and only a single argument is passed to the multiselect method, an instance of type Object will be returned for each row. If the type of the criteria query is CriteriaQuery<Object>, and more than one argument is passed to the multiselect method, an instance of type Object[] will be instantiated and returned for each row. The elements of the array will correspond to the arguments to the multiselect method.
| |
| multiselect | back to summary |
|---|---|
| public CriteriaQuery Implements jakarta. Specify the items that are to be returned in the query result. Replaces the previously specified selection(s), if any. The type of the result of the query execution depends on the specification of the criteria query object as well as the arguments to the multiselect method as follows: If the type of the criteria query is CriteriaQuery<Tuple>, a Tuple object corresponding to the items in the selection list passed to the multiselect method will be instantiated and returned for each row that results from the query execution. If the type of the criteria query is CriteriaQuery<X> for some user-defined class X, then the items in the selection list passed to the multiselect method will be passed to the X constructor and an instance of type X will be returned for each row. The IllegalStateException will be thrown if a constructor for the given argument types does not exist. If the type of the criteria query is CriteriaQuery<X[]> for some class X, an instance of type X[] will be returned for each row. The elements of the array will correspond to the items in the selection list passed to the multiselect method. The IllegalStateException will be thrown if the elements in the selection list passed to the multiselect method are not of type X. If the type of the criteria query is CriteriaQuery<Object>, and the selection list passed to the multiselect method contains only a single item, an instance of type Object will be returned for each row. If the type of the criteria query is CriteriaQuery<Object>, and the selection list passed to the multiselect method contains more than one item, an instance of type Object[] will be instantiated and returned for each row. The elements of the array will correspond to the items in the selection list passed to the multiselect method.
| |
| orderBy | back to summary |
|---|---|
| public CriteriaQuery Implements jakarta. Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous ordering, if any, is simply removed, and results will be returned in no particular order. The left-to-right sequence of the ordering expressions determines the precedence, whereby the leftmost has highest precedence.
| |
| orderBy | back to summary |
|---|---|
| public CriteriaQuery Implements jakarta. Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous ordering, if any, is simply removed, and results will be returned in no particular order. The order of the ordering expressions in the list determines the precedence, whereby the first element in the list has highest precedence.
| |
| populateAndSetConstructorSelection | back to summary |
|---|---|
| public void populateAndSetConstructorSelection(ConstructorSelectionImpl constructorSelection, Class<?> class1, Selection<?>... selections) throws IllegalArgumentException This method will set this queryImpl's selection to a ConstructorSelectionImpl, creating a new instance or populating the one passed in as necessary. Throws IllegalArgumentException if a constructor taking arguments represented by the selections array doesn't exist for the given class. Also sets the query result to ResultType.CONSTRUCTOR | |
| select | back to summary |
|---|---|
| public CriteriaQuery Implements jakarta. Specify the item that is to be returned in the query result. Replaces the previously specified selection, if any.
| |
| translate | back to summary |
|---|---|
| public DatabaseQuery translate() Overrides org. Translates from the criteria query to a EclipseLink Database Query.
| |
| where | back to summary |
|---|---|
| public CriteriaQuery Overrides org. Implements jakarta. Modify the query to restrict the query result according to the specified boolean expression. Replaces the previously added restriction(s), if any. This method only overrides the return type of the corresponding AbstractQuery method.
| |
| where | back to summary |
|---|---|
| public CriteriaQuery Overrides org. Implements jakarta. Modify the query to restrict the query result according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed. This method only overrides the return type of the corresponding AbstractQuery method.
| |