org.apache.slide.search.basic
Class OrderBy

java.lang.Object
  extended byorg.apache.slide.search.basic.OrderBy

public class OrderBy
extends java.lang.Object

Encapsulate an OrderBy expression. Also supplies a Comparator according to the specified parameters in the OrderBy expression,

Version:
$Revision: 1.11 $

Field Summary
protected  java.util.List orderByElements
          all orderby elements of this expression
 
Constructor Summary
OrderBy()
           
 
Method Summary
protected  CompareHint createCompareHint(PropertyName prop, boolean isAscending, boolean isCaseSensitive)
           
protected  PropertyName createProperty(org.jdom.Element propElem)
          Method createProperty
 java.util.Comparator getComparator()
          Method getComparator
 void init(org.jdom.Element orderByElement)
          initializes an OrderBy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

orderByElements

protected java.util.List orderByElements
all orderby elements of this expression

Constructor Detail

OrderBy

public OrderBy()
Method Detail

init

public void init(org.jdom.Element orderByElement)
          throws InvalidQueryException
initializes an OrderBy.

Parameters:
orderByElement - the JDOM element containing the orderBy expression
Throws:
InvalidQueryException

createCompareHint

protected CompareHint createCompareHint(PropertyName prop,
                                        boolean isAscending,
                                        boolean isCaseSensitive)

getComparator

public java.util.Comparator getComparator()
Method getComparator

Returns:
the comparator according to the OrderBy expression

createProperty

protected PropertyName createProperty(org.jdom.Element propElem)
                               throws InvalidQueryException
Method createProperty

Parameters:
propElem - an Element
Returns:
a _Property
Throws:
InvalidQueryException