Class UUIDGeneratingEntityEventListener
java.lang.Object
io.micronaut.data.runtime.event.listeners.AutoPopulatedEntityEventListener
io.micronaut.data.runtime.event.listeners.UUIDGeneratingEntityEventListener
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,EntityEventListener<Object>,EventListener
Supports generating UUIDs.
- Since:
- 2.3.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from interface io.micronaut.data.event.EntityEventListener
NOOPFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final @NonNull List<Class<? extends Annotation>> protected @NonNull Predicate<RuntimePersistentProperty<Object>> booleanprePersist(@NonNull EntityEventContext<Object> context) A pre-persist hook.Methods inherited from class io.micronaut.data.runtime.event.listeners.AutoPopulatedEntityEventListener
getApplicableProperties, getApplicableProperties, supportsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.data.event.EntityEventListener
postLoad, postPersist, postRemove, postUpdate, preQuery, preRemove, preUpdateMethods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Constructor Details
-
UUIDGeneratingEntityEventListener
public UUIDGeneratingEntityEventListener()
-
-
Method Details
-
getEventTypes
- Specified by:
getEventTypesin classAutoPopulatedEntityEventListener- Returns:
- The event type
-
getPropertyPredicate
- Specified by:
getPropertyPredicatein classAutoPopulatedEntityEventListener- Returns:
- A predicate to apply for the given property.
-
prePersist
Description copied from interface:EntityEventListenerA pre-persist hook. Implementors can return false to evict the operation.- Parameters:
context- The context object- Returns:
- A boolean value indicating whether to proceed with the operation.
-