Package io.micronaut.data.runtime.event
Class DefaultEntityEventContext<T>
java.lang.Object
io.micronaut.data.runtime.event.DefaultEntityEventContext<T>
- Type Parameters:
T- The entity type
- All Implemented Interfaces:
EntityEventContext<T>,PersistenceEventContext<T>
Default implementation of the
EntityEventContext interface.- Since:
- 2.3.0
- Author:
- graemerocher
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultEntityEventContext(RuntimePersistentEntity<T> persistentEntity, T entity) -
Method Summary
Modifier and TypeMethodDescription<P> voidsetProperty(io.micronaut.core.beans.BeanProperty<T, P> property, P newValue) Sets a property to its new value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.data.event.EntityEventContext
supportsEventSystem
-
Constructor Details
-
DefaultEntityEventContext
-
-
Method Details
-
getEntity
- Specified by:
getEntityin interfaceEntityEventContext<T>- Returns:
- The entity associated with the event.
-
setProperty
Description copied from interface:EntityEventContextSets a property to its new value. If the property is immutable then the copy-constructor will be used andEntityEventContext.getEntity()will return the updated entity.- Specified by:
setPropertyin interfaceEntityEventContext<T>- Type Parameters:
P- THe property type- Parameters:
property- The propertynewValue- The new value
-
getPersistentEntity
- Specified by:
getPersistentEntityin interfacePersistenceEventContext<T>- Returns:
- The
RuntimePersistentEntityassociated with the entity
-