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
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
ConstructorDescriptionMongoMappingEvent
(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
- 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
-