java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
com.google.cloud.spring.data.spanner.core.mapping.event.MutationEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DeleteEvent, SaveEvent

public class MutationEvent extends org.springframework.context.ApplicationEvent
An event holding mutations that are submitted to Cloud Spanner.
See Also:
  • Constructor Details

    • MutationEvent

      public MutationEvent(List<com.google.cloud.spanner.Mutation> source, Iterable targetEntities)
      Constructor.
      Parameters:
      source - the mutations for the event initially occurred. (never null)
      targetEntities - the target entities that need to be mutated. This may be null depending on the type of delete request.
  • Method Details

    • getMutations

      public List<com.google.cloud.spanner.Mutation> getMutations()
      Get the mutations underlying this event.
      Returns:
      the list of mutations.
    • getTargetEntities

      public Iterable getTargetEntities()
      Get the list of entities that needed to be deleted.
      Returns:
      This may be null depending on the type of delete request.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object