Class MongoMappingEvent<T>

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.data.mongodb.core.mapping.event.MongoMappingEvent<T>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractDeleteEvent, AfterConvertEvent, AfterLoadEvent, AfterSaveEvent, BeforeConvertEvent, BeforeSaveEvent

public class MongoMappingEvent<T> extends ApplicationEvent
Base ApplicationEvent triggered by Spring Data MongoDB.
Author:
Jon Brisbin, Christoph Strobl, Mark Paluch
See Also:
  • Constructor Details

    • MongoMappingEvent

      public MongoMappingEvent(T source, @Nullable org.bson.Document document, @Nullable String collectionName)
      Creates new MongoMappingEvent.
      Parameters:
      source - must not be null.
      document - can be null.
      collectionName - can be null.
  • Method Details

    • getDocument

      @Nullable public org.bson.Document getDocument()
      Returns:
      null if not set.
    • getCollectionName

      @Nullable public String getCollectionName()
      Get the collection the event refers to.
      Returns:
      null if not set.
      Since:
      1.8
    • getSource

      public T getSource()
      Overrides:
      getSource in class EventObject