Interface IndexBindingContext

All Known Subinterfaces:
IndexedEmbeddedBindingContext, IndexedEntityBindingContext

public interface IndexBindingContext
The binding context associated to a specific node in the entity tree.

The context includes in particular the corresponding node in the index schema tree.

Provides entry points to add fields to the index schema and to generate new contexts for indexed-embeddeds.

  • Method Details

    • createTypeFactory

      default IndexFieldTypeFactory createTypeFactory()
      Returns:
      The type factory of the bound index, allowing to create field types.
    • createTypeFactory

      IndexFieldTypeFactory createTypeFactory(IndexFieldTypeDefaultsProvider defaultsProvider)
      Use this method to provide some defaults to the current request. IndexFieldTypeDefaultsProvider instance will be overridden by a subsequent request.
      Parameters:
      defaultsProvider - The defaults to apply
      Returns:
      The type factory of the bound index, allowing to create field types.
    • schemaElement

      IndexSchemaElement schemaElement()
      Returns:
      The element in the index schema that this context points to.
    • schemaElement

      Parameters:
      listener - A listener to notify when operations are executed on the returned schema element.
      Returns:
      The element in the index schema that this context points to, with a wrapper that ensures the given listener will be called when operations are executed on the schema element.
    • addIndexedEmbeddedIfIncluded

      Optional<IndexedEmbeddedBindingContext> addIndexedEmbeddedIfIncluded(MappingElement mappingElement, String relativePrefix, ObjectStructure structure, TreeFilterDefinition filter, boolean multiValued)
      Parameters:
      mappingElement - A unique representation of this indexed-embedded; if the same indexed-embedded is applied in multiple places, this method must be called with mapping elements that are equal according to MappingElement.equals(Object)/MappingElement.hashCode().
      relativePrefix - The prefix to apply to all index fields created in the context of the indexed-embedded.
      structure - The structure of all object fields created as part of the relativePrefix.
      filter - The filter definition (included paths, ...).
      multiValued - Whether the property with an indexed-embedded is to be considered as multi-valued (i.e. multiple indexed-embedded objects may be processed for a single "embedding" object).
      Returns:
      A new indexed-embedded binding context, or Optional.empty().