public abstract class Query extends Object implements Serializable
A query consists of the following three optional parts:
| Constructor and Description |
|---|
Query(FilterVerifier filterVerifyer) |
| Modifier and Type | Method and Description |
|---|---|
FilterAndTerm |
getFilter()
Gets the top-level filter term.
|
OrderCriteria |
getOrderCriteria()
Gets the top-level order criteria.
|
EvaluationPolicy |
getPolicy(Class policyClass)
Extracts any set policy of the given kind.
|
OrderCriteria |
orderBy(FilterableAttribute attribute)
Orders the resulting elements by ascending values of the given attribute.
|
OrderCriteria |
orderBy(FilterableAttribute attribute,
boolean ascending)
Orders the resulting elements by either ascending or descending values of the given
attribute.
|
OrderCriteria |
orderBy(OrderCriterion criterion)
Adds a new order criterion.
|
void |
removePolicy(Class policyClass)
Removes any set policy of the given kind.
|
void |
setPolicy(EvaluationPolicy policy)
Sets the given policy.
|
String |
toString() |
FilterAndTerm |
where(FilterCriterion filter)
Adds the given filter criterion to the top-level filter term.
|
public Query(FilterVerifier filterVerifyer)
public final FilterAndTerm getFilter()
where(FilterCriterion)public final FilterAndTerm where(FilterCriterion filter) throws UnsupportedFilterException
filter - The filter criterion to be addedUnsupportedFilterException - if the filter criterion to be added is not valid
for this specific querygetFilter()public final OrderCriteria orderBy(OrderCriterion criterion)
criterion - The order criterion to add.orderBy(FilterableAttribute, boolean),
orderBy(FilterableAttribute)public final OrderCriteria orderBy(FilterableAttribute attribute)
attribute - The attribute to order by.orderBy(FilterableAttribute, boolean),
orderBy(OrderCriterion)public final OrderCriteria orderBy(FilterableAttribute attribute, boolean ascending)
attribute - The attribute to order by.ascending - Flag indicating if ordering should be performed by either ascending
or descending attribute value.orderBy(FilterableAttribute),
orderBy(OrderCriterion)public final OrderCriteria getOrderCriteria()
orderBy(FilterableAttribute),
orderBy(OrderCriterion),
orderBy(FilterableAttribute, boolean)public final EvaluationPolicy getPolicy(Class policyClass)
policyClass - The kind of policy to extract.null if no such policy exists for the query.setPolicy(org.eclipse.stardust.engine.api.query.EvaluationPolicy),
removePolicy(java.lang.Class)public final void setPolicy(EvaluationPolicy policy)
There always exists at most one policy per policy class. Thus an existing policy of the same class is overwritten.
policy - The policy to be set.getPolicy(java.lang.Class),
removePolicy(java.lang.Class)public final void removePolicy(Class policyClass)
policyClass - The kind of policy to be removed from the query.getPolicy(java.lang.Class),
setPolicy(org.eclipse.stardust.engine.api.query.EvaluationPolicy)Copyright © 2016 Eclipse Stardust. All Rights Reserved.