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,io.micronaut.data.event.EntityEventListener<java.lang.Object>,java.util.EventListener
@Singleton public class UUIDGeneratingEntityEventListener extends AutoPopulatedEntityEventListener
Supports generating UUIDs.- Since:
- 2.3.0
-
-
Constructor Summary
Constructors Constructor Description UUIDGeneratingEntityEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>>getEventTypes()protected java.util.function.Predicate<io.micronaut.data.model.runtime.RuntimePersistentProperty<java.lang.Object>>getPropertyPredicate()booleanprePersist(io.micronaut.data.event.EntityEventContext<java.lang.Object> context)-
Methods inherited from class io.micronaut.data.runtime.event.listeners.AutoPopulatedEntityEventListener
getApplicableProperties, supports
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
getEventTypes
@NonNull protected final java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getEventTypes()
- Specified by:
getEventTypesin classAutoPopulatedEntityEventListener- Returns:
- The event type
-
getPropertyPredicate
@NonNull protected java.util.function.Predicate<io.micronaut.data.model.runtime.RuntimePersistentProperty<java.lang.Object>> getPropertyPredicate()
- Specified by:
getPropertyPredicatein classAutoPopulatedEntityEventListener- Returns:
- A predicate to apply for the given property.
-
prePersist
public boolean prePersist(@NonNull io.micronaut.data.event.EntityEventContext<java.lang.Object> context)
-
-