Package com.day.cq.search.eval
Class CollectionPredicateEvaluator
java.lang.Object
com.day.cq.search.eval.AbstractPredicateEvaluator
com.day.cq.search.eval.CollectionPredicateEvaluator
- All Implemented Interfaces:
PredicateEvaluator
Finds items that are member of a specific
sling resource collection.
This is a filtering-only predicate and cannot leverage a search index. Does not support facet extraction.
Name:
memberOfProperties:
- memberOf
- path of sling resource collection
- Since:
- 6.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanFilter(Predicate predicate, EvaluationContext context) Returns the same as the deprecatedAbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext)method (ie.booleancanXpath(Predicate predicate, EvaluationContext context) Returns the inverted boolean value of the deprecatedAbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext)method (ie.getXPathExpression(Predicate predicate, EvaluationContext context) Default implementation that always returnsnull, ie.booleanincludes(Predicate p, Row row, EvaluationContext context) Default implementation that always returnstrue, ie.Methods inherited from class com.day.cq.search.eval.AbstractPredicateEvaluator
getFacetExtractor, getOrderByComparator, getOrderByProperties, isFiltering
-
Field Details
-
COLLECTION
- See Also:
-
-
Constructor Details
-
CollectionPredicateEvaluator
public CollectionPredicateEvaluator()
-
-
Method Details
-
includes
Description copied from class:AbstractPredicateEvaluatorDefault implementation that always returnstrue, ie. it does not "touch" the result set at all.- Specified by:
includesin interfacePredicateEvaluator- Overrides:
includesin classAbstractPredicateEvaluator- Parameters:
p- predicate (for this evaluator type) which is evaluatedrow- current row of the result set returned through the xpath querycontext- helper class which provides access to various elements of the query evaluation- Returns:
trueif this row should be part of the final result set,falseif it should be dropped
-
getXPathExpression
Description copied from class:AbstractPredicateEvaluatorDefault implementation that always returnsnull, ie. adds nothing to the XPath query. Subclasses can choose whether they want to implement this method or use theAbstractPredicateEvaluator.includes(Predicate, Row, EvaluationContext)method for advanced filtering (or both).- Specified by:
getXPathExpressionin interfacePredicateEvaluator- Overrides:
getXPathExpressionin classAbstractPredicateEvaluator- Parameters:
predicate- predicate (for this evaluator type) which is evaluatedcontext- helper class which provides access to various elements of the query evaluation- Returns:
- string containing an XPath predicateEvaluator expression
-
canXpath
Description copied from class:AbstractPredicateEvaluatorReturns the inverted boolean value of the deprecatedAbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext)method (ie. if not overridden,true).- Specified by:
canXpathin interfacePredicateEvaluator- Overrides:
canXpathin classAbstractPredicateEvaluator- Parameters:
predicate- predicate (for this evaluator type) which is evaluatedcontext- helper class which provides access to various elements of the query evaluation- Returns:
trueif this evaluator can express itself via xpath, ie.PredicateEvaluator.getXPathExpression(Predicate, EvaluationContext)
-
canFilter
Description copied from class:AbstractPredicateEvaluatorReturns the same as the deprecatedAbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext)method (ie. if not overridden,false).- Specified by:
canFilterin interfacePredicateEvaluator- Overrides:
canFilterin classAbstractPredicateEvaluator- Parameters:
predicate- predicate (for this evaluator type) which is evaluatedcontext- helper class which provides access to various elements of the query evaluation- Returns:
trueif this evaluator can be express itself via filtering, ie.PredicateEvaluator.includes(Predicate, Row, EvaluationContext)
-