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 protectedAbstractSort(String key, SearchSort.Order order)Constructs a sort.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetKey()Gets the key that uniquely identifies this sort method.SearchSort.OrdergetOrder()Returns the order (whetherSearchSort.Order.ASCENDINGorSearchSort.Order.DESCENDING) of the sort.inthashCode()-
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:SearchSortGets the key that uniquely identifies this sort method.- Specified by:
getKeyin interfaceSearchSort- Returns:
- the sort key
-
getOrder
public SearchSort.Order getOrder()
Description copied from interface:SearchSortReturns the order (whetherSearchSort.Order.ASCENDINGorSearchSort.Order.DESCENDING) of the sort.- Specified by:
getOrderin interfaceSearchSort- Returns:
- the order (whether
SearchSort.Order.ASCENDINGorSearchSort.Order.DESCENDING) of the sort.
-
-