com.google.appengine.api.search.dev
Class FieldExpression
- java.lang.Object
-
- com.google.appengine.api.search.dev.Expression
-
- com.google.appengine.api.search.dev.FieldExpression
-
public class FieldExpression extends Expression
Expression which evalutes to the content of a field.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.appengine.api.search.dev.Expression
Expression.Sorter
-
-
Constructor Summary
Constructors Constructor and Description FieldExpression(java.lang.String fieldName, java.util.Set<ContentType> fieldTypes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description FieldValueeval(Document doc)Evaluate the expression to field value proto for the specified document.doubleevalDouble(Document doc)Evaluate double value from specified document.FieldValueevalWithTypePriority(Document doc, java.util.List<ContentType> typePriority)Expression.SortergetNumericSorter(int sign, double defaultValueNumeric)java.util.List<Expression.Sorter>getSorters(int sign, double defaultValueNumeric, java.lang.String defaultValueText)Get list of sort classes for the expression.static FieldExpressionmakeFieldExpression(java.lang.String fieldName, java.util.Set<ContentType> fieldTypes)-
Methods inherited from class com.google.appengine.api.search.dev.Expression
makeValue
-
-
-
-
Constructor Detail
-
FieldExpression
public FieldExpression(java.lang.String fieldName, java.util.Set<ContentType> fieldTypes)
-
-
Method Detail
-
makeFieldExpression
public static FieldExpression makeFieldExpression(java.lang.String fieldName, java.util.Set<ContentType> fieldTypes)
-
evalDouble
public double evalDouble(Document doc) throws EvaluationExceptionEvaluate double value from specified document.- Throws:
EvaluationException
-
eval
public FieldValue eval(Document doc) throws EvaluationExceptionDescription copied from class:ExpressionEvaluate the expression to field value proto for the specified document.- Throws:
EvaluationException
-
evalWithTypePriority
public FieldValue evalWithTypePriority(Document doc, java.util.List<ContentType> typePriority) throws EvaluationException- Throws:
EvaluationException
-
getSorters
public java.util.List<Expression.Sorter> getSorters(int sign, double defaultValueNumeric, java.lang.String defaultValueText)
Description copied from class:ExpressionGet list of sort classes for the expression. Usually it contains just one element, but for field expressions it can potentially return 2 sorters when both numeric and text fields exist with a field name.- Returns:
- at most 2 sorters. First, special case for numberic fields. Second, alpha-numerical sort for other field types.
-
getNumericSorter
public Expression.Sorter getNumericSorter(int sign, double defaultValueNumeric)
-
-