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
ConstructorsConstructorDescriptionBeforeSaveEvent(Iterable targetEntities, Set<String> includeProperties) Constructor. -
Method Summary
Methods inherited from class com.google.cloud.spring.data.spanner.core.mapping.event.SaveEvent
getIncludePropertiesMethods 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
-
BeforeSaveEvent
Constructor.BeforeSaveEventdoes 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 benulldepending on the original request.includeProperties- the set of properties to include in the save operation.
-