org.springframework.data.mongodb.core.index
Class MongoMappingEventPublisher
java.lang.Object
org.springframework.data.mongodb.core.index.MongoMappingEventPublisher
- All Implemented Interfaces:
- ApplicationEventPublisher
public class MongoMappingEventPublisher
- extends Object
- implements ApplicationEventPublisher
An implementation of ApplicationEventPublisher that will only fire MappingContextEvent
s for use by the index
creator when MongoTemplate is used 'stand-alone', that is not declared inside a Spring ApplicationContext
.
Declare MongoTemplate
inside an ApplicationContext
to enable the publishing of all persistence events
such as AfterLoadEvent
, AfterSaveEvent
, etc.
- Author:
- Jon Brisbin, Oliver Gierke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MongoMappingEventPublisher
public MongoMappingEventPublisher(MongoPersistentEntityIndexCreator indexCreator)
- Creates a new
MongoMappingEventPublisher
for the given MongoPersistentEntityIndexCreator
.
- Parameters:
indexCreator
- must not be null.
publishEvent
public void publishEvent(ApplicationEvent event)
- Specified by:
publishEvent
in interface ApplicationEventPublisher
Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.