C
- The type of query element collectorB
- The implementation type of builders
This type is backend-specific. See SearchPredicateBuilder.toImplementation()
public interface SearchPredicateBuilderFactory<C,B>
This is the main entry point for the engine to ask the backend to build search predicates.
Modifier and Type | Method and Description |
---|---|
BooleanJunctionPredicateBuilder<B> |
bool() |
void |
contribute(C collector,
B builder)
Contribute a predicate builder to a collector.
|
MatchIdPredicateBuilder<B> |
id() |
MatchPredicateBuilder<B> |
match(String absoluteFieldPath) |
MatchAllPredicateBuilder<B> |
matchAll() |
NestedPredicateBuilder<B> |
nested(String absoluteFieldPath) |
RangePredicateBuilder<B> |
range(String absoluteFieldPath) |
SpatialWithinBoundingBoxPredicateBuilder<B> |
spatialWithinBoundingBox(String absoluteFieldPath) |
SpatialWithinCirclePredicateBuilder<B> |
spatialWithinCircle(String absoluteFieldPath) |
SpatialWithinPolygonPredicateBuilder<B> |
spatialWithinPolygon(String absoluteFieldPath) |
B |
toImplementation(SearchPredicate predicate)
Convert a
SearchPredicate object back to a predicate builder. |
SearchPredicate |
toSearchPredicate(B builder)
Convert a predicate builder to a reusable
SearchPredicate object. |
SearchPredicate toSearchPredicate(B builder)
SearchPredicate
object.
Implementations may decide to just wrap the builder if it is reusable, or to convert it to another representation if it is not reusable.
builder
- The predicate builder implementation.SearchPredicate
object.B toImplementation(SearchPredicate predicate)
SearchPredicate
object back to a predicate builder.
May be called multiple times for a given SearchPredicate
object.
predicate
- The SearchPredicate
object to convert.SearchException
- If the SearchPredicate
object was created
by a different, incompatible factory.void contribute(C collector, B builder)
Will only ever be called once per collector.
collector
- The query element collector.builder
- The predicate builder implementation.MatchAllPredicateBuilder<B> matchAll()
MatchIdPredicateBuilder<B> id()
BooleanJunctionPredicateBuilder<B> bool()
MatchPredicateBuilder<B> match(String absoluteFieldPath)
RangePredicateBuilder<B> range(String absoluteFieldPath)
NestedPredicateBuilder<B> nested(String absoluteFieldPath)
SpatialWithinCirclePredicateBuilder<B> spatialWithinCircle(String absoluteFieldPath)
SpatialWithinPolygonPredicateBuilder<B> spatialWithinPolygon(String absoluteFieldPath)
SpatialWithinBoundingBoxPredicateBuilder<B> spatialWithinBoundingBox(String absoluteFieldPath)
Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.