com.google.appengine.api.search.dev
Class Expression
- java.lang.Object
-
- com.google.appengine.api.search.dev.Expression
-
- Direct Known Subclasses:
- ExpressionBuilder.EmptyExpression , ExpressionBuilder.IntValueExpression , FieldExpression , NumericDefaultExpression , SnippetExpression
public abstract class Expression extends java.lang.Object
Abstract base class for all expression evaluators.
-
-
Nested Class Summary
Modifier and Type Class and Description Nested Classes static interface
Expression.Sorter
Sort class for potential multi dimensional sorting of the expression.
-
Constructor Summary
Constructor and Description Constructors Expression ()
-
Method Summary
Modifier and Type Method and Description All Methods Static Methods Instance Methods Abstract Methods Concrete Methods abstract FieldValue
eval (Document doc)
Evaluate the expression to field value proto for the specified document.abstract java.util.List< Expression.Sorter >
getSorters (int sign, double defaultValueNumeric, java.lang.String defaultValueText)
Get list of sort classes for the expression.static FieldValue
makeValue (ContentType type, java.lang.String stringValue)
Helper function to make field value proto from specified content.
-
-
-
Method Detail
-
eval
public abstract FieldValue eval(Document doc) throws EvaluationException
Evaluate the expression to field value proto for the specified document.- Throws:
-
EvaluationException
-
makeValue
public static final FieldValue makeValue(ContentType type, java.lang.String stringValue)
Helper function to make field value proto from specified content.
-
getSorters
public abstract java.util.List< Expression.Sorter > getSorters(int sign, double defaultValueNumeric, java.lang.String defaultValueText)
Get 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.
-
-