Class IndexedEntityBindingContextImpl
java.lang.Object
org.hibernate.search.engine.mapper.mapping.building.impl.IndexedEntityBindingContextImpl
- All Implemented Interfaces:
IndexBindingContext,IndexedEntityBindingContext
-
Constructor Summary
ConstructorsConstructorDescriptionIndexedEntityBindingContextImpl(IndexedEntityBindingMapperContext mapperContext, IndexRootBuilder indexRootBuilder) -
Method Summary
Modifier and TypeMethodDescriptionaddIndexedEmbeddedIfIncluded(MappingElement mappingElement, String relativePrefix, ObjectStructure structure, TreeFilterDefinition filter, boolean multiValued) createTypeFactory(IndexFieldTypeDefaultsProvider defaultsProvider) Use this method to provide some defaults to the current request.voidInform the backend that documents for the mapped index will always be provided along with an explicit routing key, to be used to route the document to a specific shard.<I> voididDslConverter(Class<I> valueType, ToDocumentValueConverter<I, String> converter) voididParser(ToDocumentValueConverter<String, String> parser) <I> voididProjectionConverter(Class<I> valueType, FromDocumentValueConverter<String, I> converter) schemaElement(TreeContributionListener listener) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.mapper.mapping.building.spi.IndexBindingContext
addIndexedEmbeddedIfIncluded, createTypeFactory, createTypeFactory, schemaElement, schemaElement
-
Constructor Details
-
IndexedEntityBindingContextImpl
public IndexedEntityBindingContextImpl(IndexedEntityBindingMapperContext mapperContext, IndexRootBuilder indexRootBuilder)
-
-
Method Details
-
explicitRouting
public void explicitRouting()Description copied from interface:IndexedEntityBindingContextInform the backend that documents for the mapped index will always be provided along with an explicit routing key, to be used to route the document to a specific shard.- Specified by:
explicitRoutingin interfaceIndexedEntityBindingContext
-
idDslConverter
- Specified by:
idDslConverterin interfaceIndexedEntityBindingContext
-
idProjectionConverter
public <I> void idProjectionConverter(Class<I> valueType, FromDocumentValueConverter<String, I> converter) - Specified by:
idProjectionConverterin interfaceIndexedEntityBindingContext
-
idParser
- Specified by:
idParserin interfaceIndexedEntityBindingContext
-
toString
-
createTypeFactory
Description copied from interface:IndexBindingContextUse this method to provide some defaults to the current request.IndexFieldTypeDefaultsProviderinstance will be overridden by a subsequent request.- Specified by:
createTypeFactoryin interfaceIndexBindingContext- Parameters:
defaultsProvider- The defaults to apply- Returns:
- The type factory of the bound index, allowing to create field types.
-
schemaElement
- Specified by:
schemaElementin interfaceIndexBindingContext- Returns:
- The element in the index schema that this context points to.
-
schemaElement
- Specified by:
schemaElementin interfaceIndexBindingContext- 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
public Optional<IndexedEmbeddedBindingContext> addIndexedEmbeddedIfIncluded(MappingElement mappingElement, String relativePrefix, ObjectStructure structure, TreeFilterDefinition filter, boolean multiValued) - Specified by:
addIndexedEmbeddedIfIncludedin interfaceIndexBindingContext- 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 toMappingElement.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 therelativePrefix.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().
-