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

public class DeleteEvent extends org.springframework.context.ApplicationEvent
An event published when Spring Data Cloud Datastore performs a delete operation.
See Also:
  • Constructor Details

    • DeleteEvent

      public DeleteEvent(com.google.cloud.datastore.Key[] keysToDelete, Class targetEntityClass, Iterable targetIds, Iterable targetEntities)
      Constructor.
      Parameters:
      keysToDelete - The keys that are deleted in this operation (never null).
      targetEntityClass - The target entity type deleted. This may be null depending on the specific delete operation.
      targetIds - The target entity ID values deleted. This may be null depending on the specific delete operation.
      targetEntities - The target entity objects deleted. This may be null depending on the specific delete operation.
  • Method Details

    • getKeys

      public com.google.cloud.datastore.Key[] getKeys()
      Get the keys that were deleted in this operation.
      Returns:
      the array of keys.
    • getOptionalTargetEntityClass

      public Optional<Class> getOptionalTargetEntityClass()
      Get the target entity type deleted.
      Returns:
      This may be empty depending on the specific delete operation.
    • getOptionalTargetIds

      public Optional<Iterable> getOptionalTargetIds()
      Get the target entity ID values deleted.
      Returns:
      This may be empty depending on the specific delete operation.
    • getOptionalTargetEntities

      public Optional<Iterable> getOptionalTargetEntities()
      Get thetarget entity objects deleted.
      Returns:
      This may be empty depending on the specific delete operation.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object