com.atlassian.query.order
Class SearchSort
java.lang.Object
com.atlassian.query.order.SearchSort
- All Implemented Interfaces:
- Serializable
public class SearchSort
- extends Object
- implements Serializable
A simple data bean representing a portion of the sort order (related to a clause) for a search query.
Together via the OrderBy
these will determine the sorting order of the results
returned by a Query
.
- Since:
- 4.0
- See Also:
- Serialized Form
SearchSort
public SearchSort(String field)
SearchSort
public SearchSort(String field,
SortOrder order)
- Used to construct a search sort for a field with a direction.
- Parameters:
field
- to sort by.order
- direction to sort by, if null the default order for the field will be used.
SearchSort
public SearchSort(String order,
String field)
- Deprecated. use
SearchSort(String, SortOrder)
instead.
- Used to construct a search sort for a field with a direction.
NOTE: it would be better if the order of these parameters was reversed but we are leaving it for backward compatibility.
- Parameters:
order
- the order of the sort, if null, will be the default order for the system, if not one of
SortOrder.ASC
or SortOrder.DESC
it will
default to SortOrder.ASC
.field
- to sort by.
SearchSort
public SearchSort(SearchSort copy)
getOrder
public String getOrder()
getSortOrder
public SortOrder getSortOrder()
getField
public String getField()
isReverse
public boolean isReverse()
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2002-2014 Atlassian. All Rights Reserved.