Class BeforeSaveEvent
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.SaveEvent
com.google.cloud.spring.data.spanner.core.mapping.event.BeforeSaveEvent
- All Implemented Interfaces:
Serializable
An event that is published just before a save operation is sent to Cloud Spanner.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionBeforeSaveEvent
(Iterable targetEntities, Set<String> includeProperties) Constructor. -
Method Summary
Methods inherited from class com.google.cloud.spring.data.spanner.core.mapping.event.SaveEvent
getIncludeProperties
Methods inherited from class com.google.cloud.spring.data.spanner.core.mapping.event.MutationEvent
equals, getMutations, getTargetEntities, hashCode
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
BeforeSaveEvent
Constructor.BeforeSaveEvent
does not hold mutations because this event gives the opportunity to modify the entities from which mutations are ultimately generated.- Parameters:
targetEntities
- the target entities that need to be mutated. This may benull
depending on the original request.includeProperties
- the set of properties to include in the save operation.
-