org.eclipse.stardust.engine.api.query
Class OrderCriteria

java.lang.Object
  extended by org.eclipse.stardust.engine.api.query.OrderCriteria
All Implemented Interfaces:
Serializable, OrderCriterion

public final class OrderCriteria
extends Object
implements OrderCriterion

A group of order criteria. Can be used to preconfigure specific order criteria for later reuse.

Version:
$Revision$
Author:
rsauer
See Also:
Serialized Form

Constructor Summary
OrderCriteria()
          Creates an empty group of order criteria.
OrderCriteria(OrderCriterion[] criteria)
          Groups the given order criteria.
 
Method Summary
 Object accept(OrderEvaluationVisitor visitor, Object context)
          Visitor dispatch callback used for evaluating order criteria.
 OrderCriteria and(FilterableAttribute attribute)
          Orders by ascending values of the given attribute.
 OrderCriteria and(FilterableAttribute attribute, boolean ascending)
          Orders by either ascending or descending values of the given attribute.
 OrderCriteria and(OrderCriterion criterion)
          Adds another order criterion to the list of grouped criteria.
 List getCriteria()
          Gets the list of order criteria grouped by the callee.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderCriteria

public OrderCriteria()
Creates an empty group of order criteria.


OrderCriteria

public OrderCriteria(OrderCriterion[] criteria)
Groups the given order criteria.

Parameters:
criteria - The criteria to be grouped.
Method Detail

getCriteria

public List getCriteria()
Gets the list of order criteria grouped by the callee.

Returns:
The unmodifiable list of order criteria.

accept

public Object accept(OrderEvaluationVisitor visitor,
                     Object context)
Description copied from interface: OrderCriterion
Visitor dispatch callback used for evaluating order criteria. Usually implemented as return visitor.visit(this, context), thus calling the appropriately overloaded visitation method.

Specified by:
accept in interface OrderCriterion
Parameters:
visitor - The visitor performing the evaluation.
context - Information used by the visitor during the visitation process.
Returns:
Visitor specific result of the visitation.

and

public OrderCriteria and(OrderCriterion criterion)
Adds another order criterion to the list of grouped criteria.

Parameters:
criterion - The criterion to be added.
See Also:
and(FilterableAttribute), and(FilterableAttribute, boolean)

and

public final OrderCriteria and(FilterableAttribute attribute)
Orders by ascending values of the given attribute.

Parameters:
attribute - The attribute to order by.
Returns:
The order criteria the operation is called on to allow chained calls.
See Also:
and(FilterableAttribute, boolean), and(OrderCriterion)

and

public final OrderCriteria and(FilterableAttribute attribute,
                               boolean ascending)
Orders by either ascending or descending values of the given attribute.

Parameters:
attribute - The attribute to order by.
ascending - Flag indicating if ordering should be performed by either ascending or descending attribute value.
Returns:
The order criteria the operation is called on to allow chained calls.
See Also:
and(FilterableAttribute), and(OrderCriterion)


Copyright © 2017 Eclipse Stardust. All Rights Reserved.