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 org.springframework.context.ApplicationEvent
Base
ApplicationEvent
triggered by Spring Data MongoDB.- Author:
- Jon Brisbin, Christoph Strobl, Mark Paluch
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionMongoMappingEvent
(T source, org.bson.Document document, String collectionName) Creates newMongoMappingEvent
. -
Method Summary
Modifier and TypeMethodDescriptionGet the collection the event refers to.org.bson.Document
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
MongoMappingEvent
public MongoMappingEvent(T source, @Nullable org.bson.Document document, @Nullable String collectionName) Creates newMongoMappingEvent
.- 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
Get the collection the event refers to.- Returns:
- null if not set.
- Since:
- 1.8
-
getSource
- Overrides:
getSource
in classEventObject
-