Package org.nuxeo.ecm.core.storage
Class ExpressionEvaluator
java.lang.Object
org.nuxeo.ecm.core.storage.ExpressionEvaluator
- Direct Known Subclasses:
DBSExpressionEvaluator,MapExpressionEvaluator
Evaluator for an
Expression.- Since:
- 5.9.4
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface for a class that knows how to resolve a path into an id. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringfinal booleanbooleanprotected static final Stringstatic final Stringpseudo NXQL to resolve ancestor ids.static final Stringstatic final Stringstatic final Stringpseudo NXQL to resolve internal path.static final Stringpseudo NXQL to resolve read acls.protected static final Stringprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionExpressionEvaluator(ExpressionEvaluator.PathResolver pathResolver, String[] principals, boolean fulltextSearchDisabled) -
Method Summary
Modifier and TypeMethodDescriptionprotected Booleanprotected Booleanprotected voidcheckDateLiteralForCast(Operand value, String name) protected Integerprotected Integerprotected Booleanprotected BooleaneqMaybeList(Object left, Object right) protected static BooleanChecks if the fulltext combination of string1 and string2 matches the query expression.protected static booleanprotected static booleanprotected Booleanprotected BooleaninMaybeList(Object left, List<Object> right) protected booleanisMixinTypes(Operand op) protected Booleanprotected BooleanlikeMaybeList(Object left, String right, boolean positive, boolean caseInsensitive) static StringlikeToRegex(String like) Turns a NXQL LIKE pattern into a regex.protected Booleanprotected Booleanprotected BooleanwalkAncestorId(Operator op, Operand rvalue) walkBetween(Operand lvalue, Operand rvalue, boolean positive) protected BooleanwalkEcmFulltext(String name, Operator op, Operand rvalue) protected BooleanwalkEcmPath(Operator op, Operand rvalue) walkExpression(Expression expr) walkFunction(Function func) walkIsNotNull(Operand value) walkIsNull(Operand value) protected BooleanwalkIsTrashed(Operator op, Operand rvalue) protected BooleanwalkIsTrashed(Reference ref, Operator op, Operand initialRvalue, Literal deletedRvalue) walkLiteral(Literal lit) walkLiteralList(LiteralList litList) abstract BooleanwalkMixinTypes(List<String> mixins, boolean include) Matches the mixin types against a list of values.walkOperand(Operand op) abstract ObjectwalkReference(Reference ref) Evaluates a reference over the context state.walkStartsWith(Operand lvalue, Operand rvalue) protected BooleanwalkStartsWithNonPath(Operand lvalue, String path) protected BooleanwalkStartsWithPath(String path)
-
Field Details
-
NXQL_ECM_ANCESTOR_IDS
pseudo NXQL to resolve ancestor ids.- See Also:
-
NXQL_ECM_PATH
pseudo NXQL to resolve internal path.- See Also:
-
NXQL_ECM_READ_ACL
pseudo NXQL to resolve read acls.- See Also:
-
NXQL_ECM_FULLTEXT_SIMPLE
- See Also:
-
NXQL_ECM_FULLTEXT_BINARY
- See Also:
-
DATE_CAST
- See Also:
-
PHRASE_QUOTE
- See Also:
-
NEG_PHRASE_QUOTE
- See Also:
-
OR
- See Also:
-
pathResolver
-
principals
-
fulltextSearchDisabled
public final boolean fulltextSearchDisabled -
hasFulltext
public boolean hasFulltext
-
-
Constructor Details
-
ExpressionEvaluator
public ExpressionEvaluator(ExpressionEvaluator.PathResolver pathResolver, String[] principals, boolean fulltextSearchDisabled)
-
-
Method Details
-
walkExpression
-
checkDateLiteralForCast
-
walkEcmPath
-
walkAncestorId
-
walkEcmFulltext
-
walkIsTrashed
-
walkIsTrashed
-
walkNot
-
walkIsNull
-
walkIsNotNull
-
walkMultiExpression
-
walkAnd
-
walkOr
-
walkEq
-
walkNotEq
-
walkLt
-
walkGt
-
walkLtEq
-
walkGtEq
-
walkBetween
-
walkIn
-
walkOperand
-
walkLiteral
-
walkBooleanLiteral
-
walkDateLiteral
-
walkDoubleLiteral
-
walkIntegerLiteral
-
walkStringLiteral
-
walkLiteralList
-
walkLike
-
walkFunction
-
walkStartsWith
-
walkStartsWithPath
-
walkStartsWithNonPath
-
walkReference
Evaluates a reference over the context state.- Parameters:
ref- the reference
-
isMixinTypes
-
bool
-
not
-
and
-
or
-
eq
-
in
-
cmp
-
cmp
-
like
-
likeToRegex
Turns a NXQL LIKE pattern into a regex.% and _ are standard wildcards, and \ escapes them.
- Since:
- 7.4
-
eqMaybeList
-
inMaybeList
-
likeMaybeList
-
walkMixinTypes
Matches the mixin types against a list of values.Used for:
- ecm:mixinTypes = 'foo'
- ecm:mixinTypes != 'foo'
- ecm:mixinTypes IN ('foo', 'bar')
- ecm:mixinTypes NOT IN ('foo', 'bar')
- Parameters:
mixins- the mixin(s) to matchinclude-truefor = and IN- Since:
- 7.4
-
fulltext
Checks if the fulltext combination of string1 and string2 matches the query expression. -
fulltext
-
fulltext1
-