org.openanzo.glitter.query
Class OrderingCondition
java.lang.Object
org.openanzo.glitter.query.OrderingCondition
public class OrderingCondition
- extends java.lang.Object
A single ordering condition in an ORDER BY clause of a query. This can be any expression paired
with either ascending or descending order. The expression is evaluated against pairs of solutions A and B.
If the expression evaluates to < 0, then A comes first; if > 0 then B comes first. Otherwise, the
results according to this OrderingCondition are undefined.
- Author:
- lee
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrderingCondition
public OrderingCondition(Expression condition,
boolean ascending)
- Parameters:
condition - How to sort solutions.ascending - Whether the sort order should be ascending (true) or descending (false)
OrderingCondition
public OrderingCondition(Expression condition)
- Sorts the solutions in ascending order.
- Parameters:
condition - How to sort solutions.
getCondition
public Expression getCondition()
- Returns:
- The expression giving the ordering condition.
isAscending
public boolean isAscending()
- Returns:
- Whether this
OrderingCondition sorts ascending or not (descending).
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.