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
Modifier and TypeClassDescriptionstatic interface
Interface for a class that knows how to resolve a path into an id. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
final boolean
boolean
protected static final String
static final String
pseudo NXQL to resolve ancestor ids.static final String
static final String
static final String
pseudo NXQL to resolve internal path.static final String
pseudo NXQL to resolve read acls.protected static final String
protected static final String
-
Constructor Summary
ConstructorDescriptionExpressionEvaluator
(ExpressionEvaluator.PathResolver pathResolver, String[] principals, boolean fulltextSearchDisabled) -
Method Summary
Modifier and TypeMethodDescriptionprotected Boolean
protected Boolean
protected void
checkDateLiteralForCast
(Operand value, String name) protected Integer
protected Integer
protected Boolean
protected Boolean
eqMaybeList
(Object left, Object right) protected static Boolean
Checks if the fulltext combination of string1 and string2 matches the query expression.protected static boolean
protected static boolean
protected Boolean
protected Boolean
inMaybeList
(Object left, List<Object> right) protected boolean
isMixinTypes
(Operand op) protected Boolean
protected Boolean
likeMaybeList
(Object left, String right, boolean positive, boolean caseInsensitive) static String
likeToRegex
(String like) Turns a NXQL LIKE pattern into a regex.protected Boolean
protected Boolean
protected Boolean
walkAncestorId
(Operator op, Operand rvalue) walkBetween
(Operand lvalue, Operand rvalue, boolean positive) protected Boolean
walkEcmFulltext
(String name, Operator op, Operand rvalue) protected Boolean
walkEcmPath
(Operator op, Operand rvalue) walkExpression
(Expression expr) walkFunction
(Function func) walkIsNotNull
(Operand value) walkIsNull
(Operand value) protected Boolean
walkIsTrashed
(Operator op, Operand rvalue) protected Boolean
walkIsTrashed
(Reference ref, Operator op, Operand initialRvalue, Literal deletedRvalue) walkLiteral
(Literal lit) walkLiteralList
(LiteralList litList) abstract Boolean
walkMixinTypes
(List<String> mixins, boolean include) Matches the mixin types against a list of values.walkOperand
(Operand op) abstract Object
walkReference
(Reference ref) Evaluates a reference over the context state.walkStartsWith
(Operand lvalue, Operand rvalue) protected Boolean
walkStartsWithNonPath
(Operand lvalue, String path) protected Boolean
walkStartsWithPath
(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
-true
for = and IN- Since:
- 7.4
-
fulltext
Checks if the fulltext combination of string1 and string2 matches the query expression. -
fulltext
-
fulltext1
-