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

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

public final class DataOrder
extends org.eclipse.stardust.engine.api.query.AbstractSingleOrderCriterion

Criterion for ordering elements resulting from a query according to workflow data, either with ascending or descending values.

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

Constructor Summary
DataOrder(String dataID)
          Initializes the criterion to order according to ascending values of the given workflow data.
DataOrder(String dataID, boolean ascending)
          Initializes the criterion to order according to ascending or descending values of the given workflow data.
DataOrder(String dataID, String attributeName)
          Initializes the criterion to order according to ascending values of the given workflow data.
DataOrder(String dataID, String attributeName, boolean ascending)
          Initializes the criterion to order according to ascending or descending values of the given workflow data.
 
Method Summary
 Object accept(OrderEvaluationVisitor visitor, Object context)
          Visitor dispatch callback used for evaluating order criteria.
 String getAttributeName()
          Returns the name of the data attribute
 String getDataID()
          Returns the ID of the workflow data containing the values to be used for ordering.
 String getNormalizedAttributeName()
          Returns the name of the data attribute or an empty string if the name is null.
 String toString()
           
 
Methods inherited from class org.eclipse.stardust.engine.api.query.AbstractSingleOrderCriterion
isAscending
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataOrder

public DataOrder(String dataID)
Initializes the criterion to order according to ascending values of the given workflow data.

The meaning of order depends on the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to order according to
See Also:
DataOrder(String, boolean)

DataOrder

public DataOrder(String dataID,
                 String attributeName)
Initializes the criterion to order according to ascending values of the given workflow data.

The meaning of order depends on the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to order according to
attributeName - The name of the data attribute to search for (XPath, etc.)
See Also:
DataOrder(String, boolean)

DataOrder

public DataOrder(String dataID,
                 boolean ascending)
Initializes the criterion to order according to ascending or descending values of the given workflow data.

The meaning of order depends on the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to according to.
ascending - Flag indicating if ordering has to be performed along ascending or descending values.
See Also:
DataOrder(String)

DataOrder

public DataOrder(String dataID,
                 String attributeName,
                 boolean ascending)
Initializes the criterion to order according to ascending or descending values of the given workflow data.

The meaning of order depends on the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to according to.
attributeName - The name of the data attribute to search for (XPath, etc.)
ascending - Flag indicating if ordering has to be performed along ascending or descending values.
See Also:
DataOrder(String)
Method Detail

getDataID

public String getDataID()
Returns the ID of the workflow data containing the values to be used for ordering.

Returns:
The workflow data ID.

getAttributeName

public String getAttributeName()
Returns the name of the data attribute

Returns:
the name of the data attribute or null if no name was set

getNormalizedAttributeName

public String getNormalizedAttributeName()
Returns the name of the data attribute or an empty string if the name is null.

Returns:
the name of the data attribute or an empty string if the name is null

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.

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2017 Eclipse Stardust. All Rights Reserved.