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
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:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionBeforeDeleteEvent(org.bson.Document document, Class<T> type, String collectionName) Creates a newBeforeDeleteEventfor the givenDocument, type and collectionName. -
Method Summary
Methods inherited from class org.springframework.data.mongodb.core.mapping.event.AbstractDeleteEvent
getTypeMethods inherited from class org.springframework.data.mongodb.core.mapping.event.MongoMappingEvent
getCollectionName, getDocument, getSourceMethods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
BeforeDeleteEvent
public BeforeDeleteEvent(org.bson.Document document, @Nullable Class<T> type, String collectionName) Creates a newBeforeDeleteEventfor the givenDocument, type and collectionName.- Parameters:
document- must not be null.type- may be null.collectionName- must not be null.- Since:
- 1.8
-