Class PojoTypeIndexingDependencyConfigurationContextImpl<T>
java.lang.Object
org.hibernate.search.mapper.pojo.model.dependency.impl.AbstractPojoBridgedElementDependencyContext
org.hibernate.search.mapper.pojo.model.dependency.impl.PojoTypeIndexingDependencyConfigurationContextImpl<T>
- All Implemented Interfaces:
PojoTypeIndexingDependencyConfigurationContext
public class PojoTypeIndexingDependencyConfigurationContextImpl<T>
extends AbstractPojoBridgedElementDependencyContext
implements PojoTypeIndexingDependencyConfigurationContext
-
Constructor Summary
ConstructorsConstructorDescriptionPojoTypeIndexingDependencyConfigurationContextImpl(PojoBootstrapIntrospector introspector, ContainerExtractorBinder containerExtractorBinder, PojoTypeAdditionalMetadataProvider typeAdditionalMetadataProvider, PojoTypeModel<T> typeModel) -
Method Summary
Modifier and TypeMethodDescriptionvoidcontributeDependencies(PojoIndexingDependencyCollectorTypeNode<T> dependencyCollector) fromOtherEntity(Class<?> otherEntityType, PojoModelPathValueNode pathFromOtherEntityTypeToBridgedType) Start the declaration of dependencies to properties of another entity, without specifying the path to that other entity.booleanuse(PojoModelPathValueNode pathFromBridgedTypeToUsedValue) Declare that the given path is read by the bridge at index time to populate the indexed document.Methods inherited from class org.hibernate.search.mapper.pojo.model.dependency.impl.AbstractPojoBridgedElementDependencyContext
isUseRootOnly, useRootOnlyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.mapper.pojo.model.dependency.PojoTypeIndexingDependencyConfigurationContext
fromOtherEntity, use, useRootOnly
-
Constructor Details
-
PojoTypeIndexingDependencyConfigurationContextImpl
public PojoTypeIndexingDependencyConfigurationContextImpl(PojoBootstrapIntrospector introspector, ContainerExtractorBinder containerExtractorBinder, PojoTypeAdditionalMetadataProvider typeAdditionalMetadataProvider, PojoTypeModel<T> typeModel)
-
-
Method Details
-
hasNonRootDependency
public boolean hasNonRootDependency()- Specified by:
hasNonRootDependencyin classAbstractPojoBridgedElementDependencyContext
-
use
public PojoTypeIndexingDependencyConfigurationContext use(PojoModelPathValueNode pathFromBridgedTypeToUsedValue) Description copied from interface:PojoTypeIndexingDependencyConfigurationContextDeclare that the given path is read by the bridge at index time to populate the indexed document.Every component of this path will be considered as a dependency, so it is not necessary to call this method for every subpath. In other words, if the path
"myProperty.someOtherProperty"is declared as used, Hibernate Search will automatically assume that"myProperty"is also used.- Specified by:
usein interfacePojoTypeIndexingDependencyConfigurationContext- Parameters:
pathFromBridgedTypeToUsedValue- The path from the bridged type to the value used by the bridge.- Returns:
this, for method chaining.
-
fromOtherEntity
public PojoOtherEntityIndexingDependencyConfigurationContext fromOtherEntity(Class<?> otherEntityType, PojoModelPathValueNode pathFromOtherEntityTypeToBridgedType) Description copied from interface:PojoTypeIndexingDependencyConfigurationContextStart the declaration of dependencies to properties of another entity, without specifying the path to that other entity.Note: this is only useful when the path from the bridged type to that other entity cannot be easily represented, but the inverse path can. For almost all use cases, this method won't be useful and calling
PojoTypeIndexingDependencyConfigurationContext.use(PojoModelPathValueNode)will be enough.- Specified by:
fromOtherEntityin interfacePojoTypeIndexingDependencyConfigurationContext- Parameters:
otherEntityType- The raw type of the other entity.pathFromOtherEntityTypeToBridgedType- The path from the other entity type to the bridged type. Used when the other entity changes, to collect the instances that must be reindexed.- Returns:
- A context allowing to declare which properties
-
contributeDependencies
-