Package org.nuxeo.ecm.directory.memory
Class MapExpressionEvaluator
- java.lang.Object
-
- org.nuxeo.ecm.core.storage.ExpressionEvaluator
-
- org.nuxeo.ecm.directory.memory.MapExpressionEvaluator
-
- Direct Known Subclasses:
MemoryDirectoryExpressionEvaluator
public class MapExpressionEvaluator extends ExpressionEvaluator
Evaluates an expression on a map.- Since:
- 10.3
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.ecm.core.storage.ExpressionEvaluator
ExpressionEvaluator.PathResolver
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Object>
map
protected static Long
ONE
protected static Long
ZERO
-
Fields inherited from class org.nuxeo.ecm.core.storage.ExpressionEvaluator
DATE_CAST, fulltextSearchDisabled, hasFulltext, NEG_PHRASE_QUOTE, NXQL_ECM_ANCESTOR_IDS, NXQL_ECM_FULLTEXT_BINARY, NXQL_ECM_FULLTEXT_SIMPLE, NXQL_ECM_PATH, NXQL_ECM_READ_ACL, OR, pathResolver, PHRASE_QUOTE, principals
-
-
Constructor Summary
Constructors Constructor Description MapExpressionEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matchesEntry(Expression expression, Map<String,Object> map)
protected QueryParseException
unknownProperty(String name)
protected Boolean
walkAncestorId(Operator op, Operand rvalue)
protected Boolean
walkEcmFulltext(String name, Operator op, Operand rvalue)
protected Boolean
walkEcmPath(Operator op, Operand rvalue)
protected Boolean
walkIsTrashed(Operator op, Operand rvalue)
Boolean
walkMixinTypes(List<String> mixins, boolean include)
Matches the mixin types against a list of values.Object
walkReference(Reference ref)
Evaluates a reference over the context state.Boolean
walkStartsWith(Operand lvalue, Operand rvalue)
-
Methods inherited from class org.nuxeo.ecm.core.storage.ExpressionEvaluator
and, bool, checkDateLiteralForCast, cmp, cmp, eq, eqMaybeList, fulltext, fulltext, fulltext1, in, inMaybeList, isMixinTypes, like, likeMaybeList, likeToRegex, not, or, walkAnd, walkBetween, walkBooleanLiteral, walkDateLiteral, walkDoubleLiteral, walkEq, walkExpression, walkFunction, walkGt, walkGtEq, walkIn, walkIntegerLiteral, walkIsNotNull, walkIsNull, walkIsTrashed, walkLike, walkLiteral, walkLiteralList, walkLt, walkLtEq, walkMultiExpression, walkNot, walkNotEq, walkOperand, walkOr, walkStartsWithNonPath, walkStartsWithPath, walkStringLiteral
-
-
-
-
Constructor Detail
-
MapExpressionEvaluator
public MapExpressionEvaluator()
-
-
Method Detail
-
matchesEntry
public boolean matchesEntry(Expression expression, Map<String,Object> map)
-
unknownProperty
protected QueryParseException unknownProperty(String name)
-
walkMixinTypes
public Boolean walkMixinTypes(List<String> mixins, boolean include)
Description copied from class:ExpressionEvaluator
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')
- Specified by:
walkMixinTypes
in classExpressionEvaluator
- Parameters:
mixins
- the mixin(s) to matchinclude
-true
for = and IN
-
walkEcmFulltext
protected Boolean walkEcmFulltext(String name, Operator op, Operand rvalue)
- Overrides:
walkEcmFulltext
in classExpressionEvaluator
-
walkEcmPath
protected Boolean walkEcmPath(Operator op, Operand rvalue)
- Overrides:
walkEcmPath
in classExpressionEvaluator
-
walkStartsWith
public Boolean walkStartsWith(Operand lvalue, Operand rvalue)
- Overrides:
walkStartsWith
in classExpressionEvaluator
-
walkAncestorId
protected Boolean walkAncestorId(Operator op, Operand rvalue)
- Overrides:
walkAncestorId
in classExpressionEvaluator
-
walkIsTrashed
protected Boolean walkIsTrashed(Operator op, Operand rvalue)
- Overrides:
walkIsTrashed
in classExpressionEvaluator
-
walkReference
public Object walkReference(Reference ref)
Description copied from class:ExpressionEvaluator
Evaluates a reference over the context state.- Specified by:
walkReference
in classExpressionEvaluator
- Parameters:
ref
- the reference
-
-