org.springframework.data.relational.core.mapping.event

## Class RelationalDeleteEvent<E>

- java.lang.Object
- - java.util.EventObject
  - - org.springframework.context.ApplicationEvent
    - - org.springframework.data.relational.core.mapping.event.AbstractRelationalEvent<E>
      - - org.springframework.data.relational.core.mapping.event.RelationalDeleteEvent<E>

All Implemented Interfaces:
  Serializable, RelationalEvent<E>, WithAggregateChange<E>, WithId<E>

Direct Known Subclasses:
  AfterDeleteEvent, BeforeDeleteEvent

    public abstract class RelationalDeleteEvent<E>
    extends AbstractRelationalEvent<E>
    implements WithId<E>, WithAggregateChange<E>

Super class for events produced during deleting an aggregate. Such events have an `Identifier` and an `AggregateChange` and may also have an entity if the entity was provided to the method performing the delete.

Since:
  2.0
Author:
  Jens Schauder
See Also:
  Serialized Form

### Field Summary

### Fields inherited from class java.util.EventObject

`source`

### Method Summary

All Methods Instance Methods Concrete Methods
`AggregateChange<E>` `getAggregateChange()`
`E` `getEntity()`
`Identifier` `getId()` Events with an identifier will always return a `Identifier` one.
`Class<E>` `getType()`

### Methods inherited from class org.springframework.context.ApplicationEvent

`getTimestamp`

### Methods inherited from class java.util.EventObject

`getSource, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Method Detail

#### getId

    public Identifier getId()

Description copied from interface: `WithId`
Events with an identifier will always return a `Identifier` one.

Specified by:
  `getId` in interface `WithId<E>`

#### getEntity

    @Nullable
    public E getEntity()

Specified by:
  `getEntity` in interface `RelationalEvent<E>`
Returns:
  the entity to which this event refers. Might be null.

#### getAggregateChange

    public AggregateChange<E> getAggregateChange()

Specified by:
  `getAggregateChange` in interface `WithAggregateChange<E>`
Returns:
  Guaranteed to be not null.

#### getType

    public Class<E> getType()

Specified by:
  `getType` in interface `RelationalEvent<E>`
Returns:
  the type of the entity to which the event relates.