Package com.onwbp.adaptation
Interface PrefilteredAdaptationFilter
- All Superinterfaces:
AdaptationFilter
- All Known Implementing Classes:
AbstractPrefilteredAdaptationFilter
Defines an
AdaptationFilter
that can be optimized using a prefilter predicate.
A prefilter is an XPath filter used by the query framework to filter records
without the need of calling AdaptationFilter.accept(Adaptation)
. This allows to avoid
evaluating the programmatic filter by using, e.g., index scans.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrefilteredAdaptationFilter
create
(XPathFilter prefilter, AdaptationFilter filter) Creates aPrefilteredAdaptationFilter
based onAbstractPrefilteredAdaptationFilter
.Defines the prefilter.Methods inherited from interface com.onwbp.adaptation.AdaptationFilter
accept
-
Method Details
-
getPrefilter
XPathFilter getPrefilter()Defines the prefilter. This method must always return the same filter for an instance of this interface.The prefilter
- must be consistent with
AdaptationFilter.accept(Adaptation)
, i.e., it must evaluate to true for all records where theaccept
method returnstrue
. - may not use parameters.
- should be selective, i.e., it should evaluate to true only for a relatively small part of the records of the table where the filter is applied on.
- should be "index-friendly" for best performance, i.e.,
it should be evaluated using indexes only. This can be checked by activating the debug level of the
request log and executing a the request that uses the AdaptationFilter
(see
Request.setSpecificFilter(AdaptationFilter)
). The logged physical plan should have a Lucene scan operation with a filter corresponding to the specified prefilter.
- must be consistent with
-
create
Creates aPrefilteredAdaptationFilter
based onAbstractPrefilteredAdaptationFilter
.
-