public class MongoPersistentEntityIndexResolver extends Object
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(MongoMappingContext mappingContext)
Create new
MongoPersistentEntityIndexResolver. |
public MongoPersistentEntityIndexResolver(MongoMappingContext mappingContext)
MongoPersistentEntityIndexResolver.mappingContext - must not be null.public List<MongoPersistentEntityIndexResolver.IndexDefinitionHolder> resolveIndexForClass(Class<?> type)
IndexDefinitions for properties of given type. IndexDefinitions are created
for properties and types with Indexed, CompoundIndexes or GeoSpatialIndexed.Iterable in case no IndexDefinition could be resolved for type.public List<MongoPersistentEntityIndexResolver.IndexDefinitionHolder> resolveIndexForEntity(MongoPersistentEntity<?> root)
IndexDefinitions for 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 given type.dotPath - The properties "dot" path representation from its document root.fallbackCollection - type - protected MongoPersistentEntityIndexResolver.IndexDefinitionHolder createCompoundIndexDefinition(String dotPath, String fallbackCollection, CompoundIndex index, MongoPersistentEntity<?> entity)
protected MongoPersistentEntityIndexResolver.IndexDefinitionHolder createIndexDefinition(String dotPath, String fallbackCollection, MongoPersistentProperty persitentProperty)
IndexDefinition wrapped in MongoPersistentEntityIndexResolver.IndexDefinitionHolder out of Indexed for given
MongoPersistentProperty.dotPath - The properties "dot" path representation from its document root.collection - persitentProperty - protected MongoPersistentEntityIndexResolver.IndexDefinitionHolder createGeoSpatialIndexDefinition(String dotPath, String fallbackCollection, 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-2014–2015 Pivotal Software, Inc.. All rights reserved.