com.atlassian.confluence.search.v2.sort
Class AbstractSort

java.lang.Object
  extended by com.atlassian.confluence.search.v2.sort.AbstractSort
All Implemented Interfaces:
SearchSort
Direct Known Subclasses:
CreatedSort, ModifiedSort, RelevanceSort

public abstract class AbstractSort
extends java.lang.Object
implements SearchSort

Abstract superclass for simple sort types that just sort in a particular direction on some field.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.confluence.search.v2.SearchSort
SearchSort.Order
 
Field Summary
protected static java.util.List STANDARD_ORDERS
           
 
Constructor Summary
AbstractSort(java.lang.String key)
           
AbstractSort(java.lang.String key, java.lang.String order)
           
AbstractSort(java.lang.String key, java.lang.String order, java.util.Collection permittedOrders)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getKey()
          Gets the key that uniquely identifies this sort method.
 java.lang.String getOrder()
          Gets a string describing what order the results will be sorted in.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_ORDERS

protected static final java.util.List STANDARD_ORDERS
Constructor Detail

AbstractSort

public AbstractSort(java.lang.String key)

AbstractSort

public AbstractSort(java.lang.String key,
                    java.lang.String order)

AbstractSort

public AbstractSort(java.lang.String key,
                    java.lang.String order,
                    java.util.Collection permittedOrders)
Method Detail

getKey

public java.lang.String getKey()
Description copied from interface: SearchSort
Gets the key that uniquely identifies this sort method.

Specified by:
getKey in interface SearchSort
Returns:
the sort key

getOrder

public java.lang.String getOrder()
Description copied from interface: SearchSort
Gets a string describing what order the results will be sorted in. The most common two sort orders are SearchSort.Order.ASCENDING and SearchSort.Order.DESCENDING, but implementations may define other ordering options as necessary.

Specified by:
getOrder in interface SearchSort
Returns:
a string representing the sort order

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.