|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.appengine.api.search.SortExpression
public final class SortExpression
Sorting specification for a single dimension. Multi-dimensional sorting is supported by a collection of SortExpressions.
| Nested Class Summary | |
|---|---|
static class |
SortExpression.Builder
A builder that constructs SortExpressions. |
static class |
SortExpression.SortDirection
The direction search results are sorted by, either ascending or descending. |
| Field Summary | |
|---|---|
static java.lang.String |
ORDER_ID_FIELD_NAME
The expression to be used if you wish to sort by order ID field. |
static java.lang.String |
SCORE_FIELD_NAME
The expression to be used if you wish to sort by document score. |
| Method Summary | |
|---|---|
java.lang.String |
getDefaultValue()
|
java.lang.Double |
getDefaultValueNumeric()
|
SortExpression.SortDirection |
getDirection()
|
java.lang.String |
getExpression()
|
static SortExpression.Builder |
newBuilder()
Creates and returns a SortExpression Builder. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ORDER_ID_FIELD_NAME
SortExpression expr = SortExpression.newBuilder()
.setExpression(SortExpression.ORDER_ID_FIELD_NAME)
.setDirection(SortExpression.SortDirection.ASCENDING)
.setDefaultValueNumeric(0)
.build();
public static final java.lang.String SCORE_FIELD_NAME
SortExpression expr = SortExpression.newBuilder()
.setExpression(String.format(
"%s + rating * 0.01", SortExpression.SCORE_FIELD_NAME))
.setDirection(SortExpression.SortDirection.DESCENDING)
.setDefaultValueNumeric(0)
.build();
| Method Detail |
|---|
public java.lang.String getExpression()
public SortExpression.SortDirection getDirection()
public java.lang.String getDefaultValue()
public java.lang.Double getDefaultValueNumeric()
public static SortExpression.Builder newBuilder()
SortExpression.Builder. Set the parameters for the sort
specification on the Builder, and use the SortExpression.Builder.build() method
to create a concrete instance of SortExpressionpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||