Class PojoMassIndexingIndexedTypeGroup<E>
java.lang.Object
org.hibernate.search.mapper.pojo.massindexing.impl.PojoMassIndexingIndexedTypeGroup<E>
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<PojoMassIndexingIndexedTypeGroup<?>>disjoint(PojoMassIndexingMappingContext mappingContext, PojoMassIndexingTypeContextProvider typeContextProvider, Set<? extends PojoMassIndexingIndexedTypeContext<?>> indexedTypeContexts, PojoMassLoadingContext loadingContext) Group indexed types by their closest common supertype, ensuring returned groups are disjoint (i.e.no two groups have any common indexed subtype among those provided) .<E2> ObjectextractIdentifier(PojoMassIndexingIndexedTypeContext<E2> typeContext, PojoMassIndexingSessionContext sessionContext, Object entity) extractReference(PojoMassIndexingSessionContext sessionContext, Object entity) Set<PojoMassIndexingIndexedTypeContext<? extends E>>makeSuperTypeReference(Object identifier) toString()
-
Method Details
-
disjoint
public static List<PojoMassIndexingIndexedTypeGroup<?>> disjoint(PojoMassIndexingMappingContext mappingContext, PojoMassIndexingTypeContextProvider typeContextProvider, Set<? extends PojoMassIndexingIndexedTypeContext<?>> indexedTypeContexts, PojoMassLoadingContext loadingContext) Group indexed types by their closest common supertype, ensuring returned groups are disjoint (i.e.no two groups have any common indexed subtype among those provided) .This is necessary to avoid duplicate indexing.
For example, without this, we could end up reindexing type B in one thread, and its superclass A (which will include all instances of B) in another.
- Parameters:
mappingContext- The mapping context.typeContextProvider- A provider of type contexts, used for some reflection operations.indexedTypeContexts- A set of indexed types to group together.loadingContext- Mapper-specific loading context.- Returns:
- One or more type groups that are guaranteed to be disjoint.
-
toString
-
notifiedGroupName
-
includedTypes
-
extractReference
public EntityReference extractReference(PojoMassIndexingSessionContext sessionContext, Object entity) -
makeSuperTypeReference
-
extractIdentifier
public <E2> Object extractIdentifier(PojoMassIndexingIndexedTypeContext<E2> typeContext, PojoMassIndexingSessionContext sessionContext, Object entity) -
loadingStrategy
-