Class AbstractSort
- java.lang.Object
-
- com.atlassian.confluence.search.v2.sort.AbstractSort
-
- All Implemented Interfaces:
Expandable<SearchSort>
,SearchSort
- Direct Known Subclasses:
ContentIdSort
,CreatedSort
,FavouriteSort
,FilenameSort
,FilesizeSort
,FullnameSort
,ModifiedSort
,RelevanceSort
,TitleSort
public abstract class AbstractSort extends 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, SearchSort.Type
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSort(String key, SearchSort.Order order)
Constructs a sort.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getKey()
Gets the key that uniquely identifies this sort method.SearchSort.Order
getOrder()
Returns the order (whetherSearchSort.Order.ASCENDING
orSearchSort.Order.DESCENDING
) of the sort.int
hashCode()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.search.v2.SearchSort
expand
-
-
-
-
Constructor Detail
-
AbstractSort
protected AbstractSort(String key, SearchSort.Order order)
Constructs a sort.- Parameters:
key
- a unique key to identify this sortorder
- (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 String getKey()
Description copied from interface:SearchSort
Gets the key that uniquely identifies this sort method.- Specified by:
getKey
in interfaceSearchSort
- Returns:
- the sort key
-
getOrder
public SearchSort.Order getOrder()
Description copied from interface:SearchSort
Returns the order (whetherSearchSort.Order.ASCENDING
orSearchSort.Order.DESCENDING
) of the sort.- Specified by:
getOrder
in interfaceSearchSort
- Returns:
- the order (whether
SearchSort.Order.ASCENDING
orSearchSort.Order.DESCENDING
) of the sort.
-
-