Interface PostPersistEventListener<T>

Type Parameters:
T - The entity type
All Superinterfaces:
EntityEventListener<T>, EventListener, io.micronaut.core.order.Ordered

public interface PostPersistEventListener<T> extends EntityEventListener<T>
Functional version or PostPersist event handlers.
Since:
2.3.0
Author:
graemerocher
  • Method Details

    • 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 @NonNull EntityEventContext<T> context)
      Description copied from interface: EntityEventListener
      A post-persist hook. Executed once the object has been persisted.
      Specified by:
      postPersist in interface EntityEventListener<T>
      Parameters:
      context - The context object
    • supports

      default boolean supports(RuntimePersistentEntity<T> entity, Class<? extends Annotation> eventType)
      Description copied from interface: EntityEventListener
      Allows including or excluding a listener for a specific entity.
      Specified by:
      supports in interface EntityEventListener<T>
      Parameters:
      entity - The entity
      eventType - The event type
      Returns:
      True if it is supported