public class MongoPersistentEntityIndexCreator extends Object implements ApplicationListener<MappingContextEvent<MongoPersistentEntity<?>,MongoPersistentProperty>>
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)
Creats a new
MongoPersistentEntityIndexCreator for the given MongoMappingContext and
MongoDbFactory . |
MongoPersistentEntityIndexCreator(MongoMappingContext mappingContext,
MongoDbFactory mongoDbFactory,
org.springframework.data.mongodb.core.index.IndexResolver indexResolver)
Creats a new
MongoPersistentEntityIndexCreator for the given MongoMappingContext and
MongoDbFactory . |
Modifier and Type | Method and Description |
---|---|
boolean |
isIndexCreatorFor(MappingContext<?,?> context)
Returns whether the current index creator was registered for the given
MappingContext . |
void |
onApplicationEvent(MappingContextEvent<MongoPersistentEntity<?>,MongoPersistentProperty> 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(MappingContextEvent<MongoPersistentEntity<?>,MongoPersistentProperty> event)
onApplicationEvent
in interface ApplicationListener<MappingContextEvent<MongoPersistentEntity<?>,MongoPersistentProperty>>
public boolean isIndexCreatorFor(MappingContext<?,?> context)
MappingContext
.context
- Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.