Class MongoPersistentEntityIndexCreator

java.lang.Object
org.springframework.data.mongodb.core.index.MongoPersistentEntityIndexCreator
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.data.mapping.context.MappingContextEvent<?,?>>

public class MongoPersistentEntityIndexCreator extends Object implements org.springframework.context.ApplicationListener<org.springframework.data.mapping.context.MappingContextEvent<?,?>>
Component that inspects MongoPersistentEntity instances contained in the given MongoMappingContext for indexing metadata and ensures the indexes to be available.
Author:
Jon Brisbin, Oliver Gierke, Philipp Schneider, Johno Crawford, Laurent Canet, Christoph Strobl, Mark Paluch
  • Constructor Details

  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(org.springframework.data.mapping.context.MappingContextEvent<?,?> event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.data.mapping.context.MappingContextEvent<?,?>>
    • isIndexCreatorFor

      public boolean isIndexCreatorFor(org.springframework.data.mapping.context.MappingContext<?,?> context)
      Returns whether the current index creator was registered for the given MappingContext.
      Parameters:
      context -
      Returns: