Class FullTextExpression
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.query.fulltext.FullTextExpression
-
- Direct Known Subclasses:
FullTextAnd
,FullTextContains
,FullTextOr
,FullTextTerm
public abstract class FullTextExpression extends java.lang.Object
The base class for fulltext condition expression.
-
-
Field Summary
Fields Modifier and Type Field Description static int
PRECEDENCE_AND
The operator precedence for AND conditions.static int
PRECEDENCE_OR
The operator precedence for OR conditions.static int
PRECEDENCE_TERM
The operator precedence for terms.
-
Constructor Summary
Constructors Constructor Description FullTextExpression()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
accept(FullTextVisitor v)
Let the expression call the applicable visit method of the visitor.boolean
equals(java.lang.Object other)
abstract boolean
evaluate(java.lang.String value)
Evaluate whether the value matches the condition.abstract int
getPrecedence()
Get the operator precedence.int
hashCode()
boolean
isNot()
Whether the currentFullTextExpression
is aNOT
condition or not.abstract java.lang.String
toString()
Get the string representation of the condition.
-
-
-
Field Detail
-
PRECEDENCE_OR
public static final int PRECEDENCE_OR
The operator precedence for OR conditions.- See Also:
- Constant Field Values
-
PRECEDENCE_AND
public static final int PRECEDENCE_AND
The operator precedence for AND conditions.- See Also:
- Constant Field Values
-
PRECEDENCE_TERM
public static final int PRECEDENCE_TERM
The operator precedence for terms.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPrecedence
public abstract int getPrecedence()
Get the operator precedence.- Returns:
- the precedence
-
evaluate
public abstract boolean evaluate(java.lang.String value)
Evaluate whether the value matches the condition.- Parameters:
value
- the value- Returns:
- true if it matches
-
toString
public abstract java.lang.String toString()
Get the string representation of the condition.- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
accept
public abstract boolean accept(FullTextVisitor v)
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 currentFullTextExpression
is aNOT
condition or not. Default is false- Returns:
- true if the current condition represent a NOT, false otherwise.
-
-