com.google.appengine.api.search
Class SortSpec
java.lang.Object
com.google.appengine.api.search.SortSpec
public final class SortSpec
- extends java.lang.Object
Sorting specification for a single dimension. Multi-dimensional sorting
is supported by a collection of SortSpecs.
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getType
public SortSpec.SortType getType()
- Returns:
- the type of the SortSpec
getLimit
public int getLimit()
- Returns:
- the maximum number of top retrieved results to score
getExpression
public java.lang.String getExpression()
- Returns:
- the expression to evaluate for each document and sort by
isSortDescending
public boolean isSortDescending()
- Returns:
- whether to sort in descending order or ascending order
getDefaultValue
public java.lang.String getDefaultValue()
- Returns:
- the default value for the field. Can be null
getDefaultValueNumeric
public java.lang.Double getDefaultValueNumeric()
- Returns:
- the default numeric value for the field. Can be null
newBuilder
public static SortSpec.Builder newBuilder()
- Creates and returns a SortSpec Builder.
- Returns:
- a new
SortSpec.Builder. Set the parameters for the sort
specification on the Builder, and use the SortSpec.Builder.build() method
to create a concrete instance of SortSpec
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object