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

## Class RelationalEventWithEntity<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.RelationalEventWithEntity<E>

All Implemented Interfaces:
  Serializable, RelationalEvent<E>, WithEntity<E>

Direct Known Subclasses:
  AfterLoadEvent, RelationalSaveEvent

    public class RelationalEventWithEntity<E>
    extends AbstractRelationalEvent<E>
    implements WithEntity<E>

An event that is guaranteed to have an entity.

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
`E` `getEntity()` Overridden in order to change nullability.
`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

#### getEntity

    public E getEntity()

Description copied from interface: `WithEntity`
Overridden in order to change nullability.

Specified by:
  `getEntity` in interface `RelationalEvent<E>`
Specified by:
  `getEntity` in interface `WithEntity<E>`
Returns:
  the entity to which this event refers. 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.