Class BeforeDeleteEvent<T>

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.data.mongodb.core.mapping.event.MongoMappingEvent<org.bson.Document>
org.springframework.data.mongodb.core.mapping.event.AbstractDeleteEvent<T>
org.springframework.data.mongodb.core.mapping.event.BeforeDeleteEvent<T>
All Implemented Interfaces:
Serializable

public class BeforeDeleteEvent<T> extends AbstractDeleteEvent<T>
Event being thrown before a document is deleted. The Document held in the event will represent the query document before being mapped based on the domain class handled.
Author:
Martin Baumgartner, Christoph Strobl, Mark Paluch
See Also:
  • Constructor Details

    • BeforeDeleteEvent

      public BeforeDeleteEvent(org.bson.Document document, @Nullable Class<T> type, String collectionName)
      Creates a new BeforeDeleteEvent for the given Document, type and collectionName.
      Parameters:
      document - must not be null.
      type - may be null.
      collectionName - must not be null.
      Since:
      1.8