Interface ChangeEvent<E>
- Type Parameters:
E- The persistent entity type.
- All Known Implementing Classes:
DefaultChangeEvent, DeferredChangeEvent
public interface ChangeEvent<E>
A database change or subscription lifecycle notification for a persistent entity type.
Entity state is optional. A provider may load it after the change has committed, so it is not necessarily a snapshot of the row at the time of the change. An event that does not identify one row, such as an invalidation or subscription termination, has no single entity associated with it.
- Since:
- 5.3.0
-
Method Summary
Modifier and TypeMethodDescriptionentity()Returns the entity state associated with this event, when it is available.<M extends ChangeEventMetadata>
Optional<M> Finds provider-specific metadata of the requested type.Returns the operation reported by the notification provider.
-
Method Details
-
operation
ChangeOperation operation()Returns the operation reported by the notification provider.- Returns:
- The reported change operation.
-
entity
-
metadata
Finds provider-specific metadata of the requested type.- Type Parameters:
M- The metadata type.- Parameters:
metadataType- The metadata type.- Returns:
- The metadata when this event contains the requested type.
-