public class MongoPersistentEntityIndexResolver extends Object implements IndexResolver
IndexResolver implementation inspecting MongoPersistentEntity for MongoPersistentEntity to be
indexed. MongoPersistentProperty of the MongoPersistentEntity are inspected for potential indexes by
scanning related annotations.| Modifier and Type | Class and Description |
|---|---|
static class |
MongoPersistentEntityIndexResolver.CyclicPropertyReferenceException |
static class |
MongoPersistentEntityIndexResolver.IndexDefinitionHolder
Implementation of
IndexDefinition holding additional (property)path information used for creating the
index. |
| Constructor and Description |
|---|
MongoPersistentEntityIndexResolver(MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
Create new
MongoPersistentEntityIndexResolver. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, resolveIndexForpublic MongoPersistentEntityIndexResolver(MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
MongoPersistentEntityIndexResolver.mappingContext - must not be null.public Iterable<? extends MongoPersistentEntityIndexResolver.IndexDefinitionHolder> resolveIndexFor(TypeInformation<?> typeInformation)
IndexResolverIndexDefinitions for properties of given TypeInformation. IndexDefinitions
are created for properties and types with Indexed, CompoundIndexes or GeoSpatialIndexed.resolveIndexFor in interface IndexResolvertypeInformation - must not be null.Iterable in case no IndexDefinition could be resolved for type.public List<MongoPersistentEntityIndexResolver.IndexDefinitionHolder> resolveIndexForEntity(MongoPersistentEntity<?> root)
IndexDefinitions for a given root entity by traversing
MongoPersistentProperty scanning for index annotations Indexed, CompoundIndex and
GeospatialIndex. The given root has therefore to be annotated with Document.root - must not be null.MongoPersistentEntityIndexResolver.IndexDefinitionHolder. Will never be null.IllegalArgumentException - in case of missing Document annotation marking root entities.protected List<MongoPersistentEntityIndexResolver.IndexDefinitionHolder> createCompoundIndexDefinitions(String dotPath, String fallbackCollection, MongoPersistentEntity<?> entity)
IndexDefinition wrapped in MongoPersistentEntityIndexResolver.IndexDefinitionHolder for CompoundIndexes of a given
type.dotPath - The properties "dot" path representation from its document root.fallbackCollection - entity - protected MongoPersistentEntityIndexResolver.IndexDefinitionHolder createCompoundIndexDefinition(String dotPath, String collection, CompoundIndex index, MongoPersistentEntity<?> entity)
@Nullable protected MongoPersistentEntityIndexResolver.IndexDefinitionHolder createIndexDefinition(String dotPath, String collection, MongoPersistentProperty persistentProperty)
IndexDefinition wrapped in MongoPersistentEntityIndexResolver.IndexDefinitionHolder out of Indexed for a given
MongoPersistentProperty.dotPath - The properties "dot" path representation from its document root.collection - persistentProperty - @Nullable protected MongoPersistentEntityIndexResolver.IndexDefinitionHolder createHashedIndexDefinition(String dotPath, String collection, MongoPersistentProperty persistentProperty)
HashedIndex wrapped in MongoPersistentEntityIndexResolver.IndexDefinitionHolder out of HashIndexed for a given
MongoPersistentProperty.dotPath - The properties "dot" path representation from its document root.collection - persistentProperty - protected EvaluationContext getEvaluationContext()
EvaluationContext.public void setEvaluationContextProvider(EvaluationContextProvider evaluationContextProvider)
EvaluationContextProvider used for obtaining the EvaluationContext used to compute
expressions.evaluationContextProvider - must not be null.@Nullable protected MongoPersistentEntityIndexResolver.IndexDefinitionHolder createGeoSpatialIndexDefinition(String dotPath, String collection, MongoPersistentProperty persistentProperty)
IndexDefinition wrapped in MongoPersistentEntityIndexResolver.IndexDefinitionHolder out of GeoSpatialIndexed for
MongoPersistentProperty.dotPath - The properties "dot" path representation from its document root.collection - persistentProperty - Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.