Class ConfiguredTreeNestingContext
- All Implemented Interfaces:
TreeNestingContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.search.engine.common.tree.spi.TreeNestingContext
TreeNestingContext.CompositeFactory<T>, TreeNestingContext.LeafFactory<T>, TreeNestingContext.NestedContextBuilder<T>, TreeNestingContext.UnfilteredFactory<T> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T> Tnest(String relativeName, TreeNestingContext.CompositeFactory<T> factory) Nest a composite node in this context.<T> Tnest(String relativeName, TreeNestingContext.LeafFactory<T> factory) Nest a leaf node in this context.<T> Optional<T>nestComposed(MappingElement mappingElement, String relativePrefix, TreeFilterDefinition definition, TreeFilterPathTracker pathTracker, TreeNestingContext.NestedContextBuilder<T> contextBuilder, BiFunction<MappingElement, String, SearchException> cyclicRecursionExceptionFactory) Creates a nested context within this context, composing the given filter within this context's filter.<T> TnestUnfiltered(TreeNestingContext.UnfilteredFactory<T> factory) Nest an unfiltered node in this context.toString()
-
Field Details
-
ROOT
-
-
Method Details
-
toString
-
nest
Description copied from interface:TreeNestingContextNest a leaf node in this context.The schema element will be created using the given factory, passing the
TreeNodeInclusionto signal whether it's included or not.The name passed to the factory will still be relative and still won't contain any dot ("."), but may be prefixed as required by this context's configuration.
- Specified by:
nestin interfaceTreeNestingContext- Type Parameters:
T- The type of the created node.- Parameters:
relativeName- The base of the relative field name, which may get prefixed before it is passed to the factory.factory- The element factory to use.- Returns:
- The created node.
-
nest
Description copied from interface:TreeNestingContextNest a composite node in this context.The node will be created using the given factory, passing the
TreeNodeInclusionto signal whether it's included or not.The name passed to the factory will still be relative and still won't contain any dot ("."), but may be prefixed as required by this context's configuration.
- Specified by:
nestin interfaceTreeNestingContext- Type Parameters:
T- The type of the created node.- Parameters:
relativeName- The base of the relative field name, which may get prefixed before it is passed to the factory.factory- The element factory to use.- Returns:
- The created node.
-
nestUnfiltered
Description copied from interface:TreeNestingContextNest an unfiltered node in this context.The node will be created using the given factory, passing the
TreeNodeInclusionto signal whether it's included or not.Unfiltered nodes do not take inclusion filters into account; they are included as soon as their parent is included.
- Specified by:
nestUnfilteredin interfaceTreeNestingContext- Type Parameters:
T- The type of the created nodes.- Parameters:
factory- The element factory to use.- Returns:
- The created nodes.
-
nestComposed
public <T> Optional<T> nestComposed(MappingElement mappingElement, String relativePrefix, TreeFilterDefinition definition, TreeFilterPathTracker pathTracker, TreeNestingContext.NestedContextBuilder<T> contextBuilder, BiFunction<MappingElement, String, SearchException> cyclicRecursionExceptionFactory) Description copied from interface:TreeNestingContextCreates a nested context within this context, composing the given filter within this context's filter.The node will be created using the given
builder.If the resulting context excludes everything, this method returns
Optional.empty().- Specified by:
nestComposedin interfaceTreeNestingContext- Type Parameters:
T- The type of the created context.- Parameters:
mappingElement- A unique representation of the mapping element defining the filter; if the same mapping is applied in multiple places, this method must be called with mapping elements that are equal according toMappingElement.equals(Object)/MappingElement.hashCode().relativePrefix- The prefix to prepend to the relative path of all nodes nested in the resulting context.definition- The filter definition (included paths, ...).pathTracker- The path tracker, for detection of useless filters.contextBuilder- The builder for the created context.cyclicRecursionExceptionFactory- A factory for exceptions thrown when encountering cyclic (infinite) filter recursions.- Returns:
- The created context.
-