Spring Data Document

org.springframework.data.mongodb.core.mapping.event
Class AbstractMongoEventListener<E>

java.lang.Object
  extended by org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener<E>
All Implemented Interfaces:
EventListener, ApplicationListener<MongoMappingEvent<?>>
Direct Known Subclasses:
LoggingEventListener

public abstract class AbstractMongoEventListener<E>
extends Object
implements ApplicationListener<MongoMappingEvent<?>>

Base class to implement domain class specific ApplicationListeners.

Author:
Jon Brisbin, Oliver Gierke

Field Summary
protected  org.apache.commons.logging.Log LOG
           
 
Constructor Summary
AbstractMongoEventListener()
          Creates a new AbstractMongoEventListener.
 
Method Summary
 void onAfterConvert(DBObject dbo, E source)
           
 void onAfterLoad(DBObject dbo)
           
 void onAfterSave(E source, DBObject dbo)
           
 void onApplicationEvent(MongoMappingEvent<?> event)
           
 void onBeforeConvert(E source)
           
 void onBeforeSave(E source, DBObject dbo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected final org.apache.commons.logging.Log LOG
Constructor Detail

AbstractMongoEventListener

public AbstractMongoEventListener()
Creates a new AbstractMongoEventListener.

Method Detail

onApplicationEvent

public void onApplicationEvent(MongoMappingEvent<?> event)
Specified by:
onApplicationEvent in interface ApplicationListener<MongoMappingEvent<?>>

onBeforeConvert

public void onBeforeConvert(E source)

onBeforeSave

public void onBeforeSave(E source,
                         DBObject dbo)

onAfterSave

public void onAfterSave(E source,
                        DBObject dbo)

onAfterLoad

public void onAfterLoad(DBObject dbo)

onAfterConvert

public void onAfterConvert(DBObject dbo,
                           E source)

Spring Data Document

Copyright © 2012. All Rights Reserved.