public class MongoPersistentEntityIndexCreator extends Object implements org.springframework.context.ApplicationListener<org.springframework.data.mapping.context.MappingContextEvent<?,?>>
MongoPersistentEntity instances contained in the given MongoMappingContext
for indexing metadata and ensures the indexes to be available.| Constructor and Description |
|---|
MongoPersistentEntityIndexCreator(MongoMappingContext mappingContext,
MongoDbFactory mongoDbFactory)
Creates a new
MongoPersistentEntityIndexCreator for the given MongoMappingContext and
MongoDbFactory. |
MongoPersistentEntityIndexCreator(MongoMappingContext mappingContext,
MongoDbFactory mongoDbFactory,
org.springframework.data.mongodb.core.index.IndexResolver indexResolver)
Creates a new
MongoPersistentEntityIndexCreator for the given MongoMappingContext and
MongoDbFactory. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isIndexCreatorFor(org.springframework.data.mapping.context.MappingContext<?,?> context)
Returns whether the current index creator was registered for the given
MappingContext. |
void |
onApplicationEvent(org.springframework.data.mapping.context.MappingContextEvent<?,?> event) |
public MongoPersistentEntityIndexCreator(MongoMappingContext mappingContext, MongoDbFactory mongoDbFactory)
MongoPersistentEntityIndexCreator for the given MongoMappingContext and
MongoDbFactory.mappingContext - must not be null.mongoDbFactory - must not be null.public MongoPersistentEntityIndexCreator(MongoMappingContext mappingContext, MongoDbFactory mongoDbFactory, org.springframework.data.mongodb.core.index.IndexResolver indexResolver)
MongoPersistentEntityIndexCreator for the given MongoMappingContext and
MongoDbFactory.mappingContext - must not be null.mongoDbFactory - must not be null.indexResolver - must not be null.public void onApplicationEvent(org.springframework.data.mapping.context.MappingContextEvent<?,?> event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.data.mapping.context.MappingContextEvent<?,?>>public boolean isIndexCreatorFor(org.springframework.data.mapping.context.MappingContext<?,?> context)
MappingContext.context - Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.