|
Spring Data MongoDB - Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.mongodb.core.index.MongoPersistentEntityIndexResolver
public class MongoPersistentEntityIndexResolver
IndexResolver implementation inspecting MongoPersistentEntity for MongoPersistentEntity to be
indexed.
All MongoPersistentProperty of the MongoPersistentEntity are inspected for potential indexes by
scanning related annotations.
| Nested Class Summary | |
|---|---|
static class |
MongoPersistentEntityIndexResolver.CyclicPropertyReferenceException
|
static class |
MongoPersistentEntityIndexResolver.IndexDefinitionHolder
Implementation of IndexDefinition holding additional (property)path information used for creating the
index. |
| Constructor Summary | |
|---|---|
MongoPersistentEntityIndexResolver(MongoMappingContext mappingContext)
Create new MongoPersistentEntityIndexResolver. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MongoPersistentEntityIndexResolver(MongoMappingContext mappingContext)
MongoPersistentEntityIndexResolver.
mappingContext - must not be null.| Method Detail |
|---|
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,
Class<?> type)
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)
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 -
|
Spring Data MongoDB - Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||