com.atlassian.query.order
Class SearchSort
java.lang.Object
com.atlassian.query.order.SearchSort
- All Implemented Interfaces:
- java.io.Serializable
public class SearchSort
- extends java.lang.Object
- implements java.io.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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SearchSort
public SearchSort(java.lang.String field)
SearchSort
public SearchSort(java.lang.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(java.lang.String order,
java.lang.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 java.lang.String getOrder()
getSortOrder
public SortOrder getSortOrder()
getField
public java.lang.String getField()
isReverse
public boolean isReverse()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
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 © 2002-2010 Atlassian. All Rights Reserved.