Interface PostPersistEventListener<T>
-
- Type Parameters:
T
- The entity type
- All Superinterfaces:
EntityEventListener<T>
,java.util.EventListener
,io.micronaut.core.order.Ordered
public interface PostPersistEventListener<T> extends EntityEventListener<T>
Functional version orPostPersist
event handlers.- Since:
- 2.3.0
-
-
Field Summary
-
Fields inherited from interface io.micronaut.data.event.EntityEventListener
NOOP
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
postPersist(EntityEventContext<T> context)
A post-persist hook.void
postPersist(T entity)
A post-persist hook.default boolean
supports(RuntimePersistentEntity<T> entity, java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Allows including or excluding a listener for a specific entity.-
Methods inherited from interface io.micronaut.data.event.EntityEventListener
postLoad, postRemove, postUpdate, prePersist, preQuery, preRemove, preUpdate
-
-
-
-
Method Detail
-
postPersist
void postPersist(@NonNull T entity)
A post-persist hook. Implementors can return false to evict the operation.- Parameters:
entity
- The entity
-
postPersist
default void postPersist(@NonNull EntityEventContext<T> context)
Description copied from interface:EntityEventListener
A post-persist hook. Executed once the object has been persisted.- Specified by:
postPersist
in interfaceEntityEventListener<T>
- Parameters:
context
- The context object
-
supports
default boolean supports(RuntimePersistentEntity<T> entity, java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Description copied from interface:EntityEventListener
Allows including or excluding a listener for a specific entity.- Specified by:
supports
in interfaceEntityEventListener<T>
- Parameters:
entity
- The entityeventType
- The event type- Returns:
- True if it is supported
-
-