Interface PreUpdateEventListener<T>
- Type Parameters:
T- The entity type
- All Superinterfaces:
EntityEventListener<T>,EventListener,io.micronaut.core.order.Ordered
Functional version or
PreUpdate event handlers.- Since:
- 2.3.0
-
Field Summary
Fields inherited from interface io.micronaut.data.event.EntityEventListener
NOOPFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanpreUpdate(@NonNull EntityEventContext<T> context) A pre-update hook.booleanA pre-update hook.default booleansupports(RuntimePersistentEntity<T> entity, Class<? extends Annotation> eventType) Allows including or excluding a listener for a specific entity.Methods inherited from interface io.micronaut.data.event.EntityEventListener
postLoad, postPersist, postRemove, postUpdate, prePersist, preQuery, preRemoveMethods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Method Details
-
preUpdate
A pre-update hook. Implementors can return false to evict the operation.- Parameters:
entity- The entity- Returns:
- A boolean value indicating whether to proceed with the operation.
-
preUpdate
Description copied from interface:EntityEventListenerA pre-update hook. Implementors can return false to evict the operation.- Specified by:
preUpdatein interfaceEntityEventListener<T>- Parameters:
context- The context object- Returns:
- A boolean value indicating whether to proceed with the operation.
-
supports
Description copied from interface:EntityEventListenerAllows including or excluding a listener for a specific entity.- Specified by:
supportsin interfaceEntityEventListener<T>- Parameters:
entity- The entityeventType- The event type- Returns:
- True if it is supported
-