Class FullTextExpression
java.lang.Object
org.apache.jackrabbit.oak.spi.query.fulltext.FullTextExpression
- Direct Known Subclasses:
FullTextAnd,FullTextContains,FullTextOr,FullTextTerm
The base class for fulltext condition expression.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe operator precedence for AND conditions.static final intThe operator precedence for OR conditions.static final intThe operator precedence for terms. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanLet the expression call the applicable visit method of the visitor.booleanabstract booleanEvaluate whether the value matches the condition.abstract intGet the operator precedence.inthashCode()booleanisNot()Whether the currentFullTextExpressionis aNOTcondition or not.abstract StringtoString()Get the string representation of the condition.
-
Field Details
-
PRECEDENCE_OR
public static final int PRECEDENCE_ORThe operator precedence for OR conditions.- See Also:
-
PRECEDENCE_AND
public static final int PRECEDENCE_ANDThe operator precedence for AND conditions.- See Also:
-
PRECEDENCE_TERM
public static final int PRECEDENCE_TERMThe operator precedence for terms.- See Also:
-
-
Constructor Details
-
FullTextExpression
public FullTextExpression()
-
-
Method Details
-
getPrecedence
public abstract int getPrecedence()Get the operator precedence.- Returns:
- the precedence
-
evaluate
Evaluate whether the value matches the condition.- Parameters:
value- the value- Returns:
- true if it matches
-
toString
Get the string representation of the condition. -
equals
-
hashCode
public int hashCode() -
accept
Let the expression call the applicable visit method of the visitor.- Parameters:
v- the visitor- Returns:
- true if the visit method returned true
-
isNot
public boolean isNot()Whether the currentFullTextExpressionis aNOTcondition or not. Default is false- Returns:
- true if the current condition represent a NOT, false otherwise.
-