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, FilenameSort, FilesizeSort, FullnameSort, ModifiedSort, RelevanceSort, TitleSort

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
 
Constructor Summary
protected AbstractSort(java.lang.String key, SearchSort.Order order)
          Constructs a sort.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getKey()
          Gets the key that uniquely identifies this sort method.
 SearchSort.Order getOrder()
          Returns the order (whether SearchSort.Order.ASCENDING or SearchSort.Order.DESCENDING) of the sort.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSort

protected AbstractSort(java.lang.String key,
                       SearchSort.Order order)
Constructs a sort.

Parameters:
key - a unique key to identify this sort
order - (required) the order of the sort (SearchSort.Order). Implementations should define what ascending and descending means in regards to their custom sort type.
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 SearchSort.Order getOrder()
Description copied from interface: SearchSort
Returns the order (whether SearchSort.Order.ASCENDING or SearchSort.Order.DESCENDING) of the sort.

Specified by:
getOrder in interface SearchSort
Returns:
the order (whether SearchSort.Order.ASCENDING or SearchSort.Order.DESCENDING) of the sort.

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-2014 Atlassian. All Rights Reserved.