public abstract class AbstractPredicateEvaluator extends java.lang.Object implements PredicateEvaluator
AbstractPredicateEvaluator is a base implementation for
predicate evaluators. Predicate evaluator implementations are encouraged
to extend from this abstract base class to minimize migration efforts when
new changes are added to the PredicateEvaluator API.
This implementation basically does "nothing":
| Constructor and Description |
|---|
AbstractPredicateEvaluator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFilter(Predicate predicate,
EvaluationContext context)
Returns the same as the deprecated
isFiltering(Predicate, EvaluationContext) method (ie. |
boolean |
canXpath(Predicate predicate,
EvaluationContext context)
Returns the inverted boolean value of the deprecated
isFiltering(Predicate, EvaluationContext) method (ie. |
FacetExtractor |
getFacetExtractor(Predicate predicate,
EvaluationContext context)
Default implementation that always returns
null, ie. |
java.util.Comparator<Row> |
getOrderByComparator(Predicate predicate,
EvaluationContext context)
Default implementation that always returns
null. |
java.lang.String[] |
getOrderByProperties(Predicate predicate,
EvaluationContext context)
Default implementation that always returns
null. |
java.lang.String |
getXPathExpression(Predicate predicate,
EvaluationContext context)
Default implementation that always returns
null, ie. |
boolean |
includes(Predicate predicate,
Row row,
EvaluationContext context)
Default implementation that always returns
true, ie. |
boolean |
isFiltering(Predicate predicate,
EvaluationContext context)
Deprecated.
|
public java.lang.String getXPathExpression(Predicate predicate, EvaluationContext context)
null, ie. adds
nothing to the XPath query. Subclasses can choose whether they want to
implement this method or use the
includes(Predicate, Row, EvaluationContext) method for advanced
filtering (or both).getXPathExpression in interface PredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationpublic java.lang.String[] getOrderByProperties(Predicate predicate, EvaluationContext context)
null.getOrderByProperties in interface PredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationnullpublic boolean canXpath(Predicate predicate, EvaluationContext context)
isFiltering(Predicate, EvaluationContext) method (ie. if not
overridden, true).canXpath in interface PredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationtrue if this evaluator can express itself via xpath,
ie. PredicateEvaluator.getXPathExpression(Predicate, EvaluationContext)public boolean canFilter(Predicate predicate, EvaluationContext context)
isFiltering(Predicate, EvaluationContext) method (ie. if not
overridden, false).canFilter in interface PredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationtrue if this evaluator can be express itself via
filtering, ie.
PredicateEvaluator.includes(Predicate, Row, EvaluationContext)@Deprecated public boolean isFiltering(Predicate predicate, EvaluationContext context)
false, because
the includes(Predicate, Row, EvaluationContext) also always
returns true in this implementation and hence does no
filtering at all.isFiltering in interface PredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationtrue if this evaluator is filtering the result set
for the given predicatepublic boolean includes(Predicate predicate, Row row, EvaluationContext context)
true, ie. it does
not "touch" the result set at all.includes in interface PredicateEvaluatorpredicate - 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 evaluationtrue if this row should be part of the final result
set, false if it should be droppedpublic java.util.Comparator<Row> getOrderByComparator(Predicate predicate, EvaluationContext context)
null.getOrderByComparator in interface PredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationnullpublic FacetExtractor getFacetExtractor(Predicate predicate, EvaluationContext context)
null, ie. no
facets will be extracted for the predicate.getFacetExtractor in interface PredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationFacetExtractor that is used to create a Facet
or null if no extractor shall be providedCopyright © 2010 - 2023 Adobe. All Rights Reserved