CosmosMappingEvent<T> Class
- java.
lang. Object - java.
util. EventObject - org.
springframework. context. ApplicationEvent - com.
azure. spring. data. cosmos. core. mapping. event. CosmosMappingEvent<T>
- com.
- org.
- java.
Type Parameters
- T
the type of the event.
public class CosmosMappingEvent
extends org.springframework.context.ApplicationEvent
Base Class that all cosmos related spring application events extend Ported to cosmos from spring-data-mongo https://github.com/spring-projects/spring-data-mongodb/blob/main/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/event/MongoMappingEvent.java
Constructor Summary
Constructor | Description |
---|---|
CosmosMappingEvent(T source, JsonNode document, String containerName) |
Creates new CosmosMappingEvent<T>. |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getContainerName()
Get the container the event refers to. |
com.fasterxml.jackson.databind.JsonNode |
getDocument()
Return null if not set. |
T | getSource() |
Methods inherited from java.lang.Object
Methods inherited from java.util.EventObject
Methods inherited from org.springframework.context.ApplicationEvent
Constructor Details
CosmosMappingEvent
public CosmosMappingEvent(T source, JsonNode document, String containerName)
Creates new CosmosMappingEvent<T>.
Parameters:
Method Details
getContainerName
public String getContainerName()
Get the container the event refers to.
Returns:
getDocument
public JsonNode getDocument()
Return null if not set.
Returns:
getSource
public T getSource()
Overrides:
CosmosMappingEvent<T>.getSource()Applies to
Azure SDK for Java