Class DeleteEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
com.google.cloud.spring.data.spanner.core.mapping.event.MutationEvent
com.google.cloud.spring.data.spanner.core.mapping.event.DeleteEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AfterDeleteEvent,BeforeDeleteEvent
An event signaling a Cloud Spanner delete operation.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionDeleteEvent(List<com.google.cloud.spanner.Mutation> source, Iterable targetEntities, com.google.cloud.spanner.KeySet targetKeys, Class targetType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.spanner.KeySetGet the list of keys that needed to be deleted.Get the type of entity that needed to be deleted.Methods inherited from class com.google.cloud.spring.data.spanner.core.mapping.event.MutationEvent
equals, getMutations, getTargetEntities, hashCodeMethods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
DeleteEvent
public DeleteEvent(List<com.google.cloud.spanner.Mutation> source, Iterable targetEntities, com.google.cloud.spanner.KeySet targetKeys, Class targetType) Constructor.- Parameters:
source- the mutations for the event initially occurred. (nevernull)targetEntities- the target entities that need to be deleted.This may benulldepending on the type of delete request.targetKeys- the target keys that need to be deleted. This may benulldepending on the type of delete request.targetType- the target entity type that needs to be deleted. This may benulldepending on the type of delete request.
-
-
Method Details
-
getTargetKeys
public com.google.cloud.spanner.KeySet getTargetKeys()Get the list of keys that needed to be deleted.- Returns:
- This may be
nulldepending on the type of delete request.
-
getTargetType
Get the type of entity that needed to be deleted.- Returns:
- This may be
nulldepending on the type of delete request.
-