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 SummaryConstructorsConstructorDescriptionDefaultEntityEventContext(RuntimePersistentEntity<T> persistentEntity, T entity) 
- 
Method SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.data.event.EntityEventContextsupportsEventSystem
- 
Constructor Details- 
DefaultEntityEventContext
 
- 
- 
Method Details- 
getEntity- Specified by:
- getEntityin interface- EntityEventContext<T>
- Returns:
- The entity associated with the event.
 
- 
setPropertyDescription 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 interface- EntityEventContext<T>
- Type Parameters:
- P- THe property type
- Parameters:
- property- The property
- newValue- The new value
 
- 
getPersistentEntity- Specified by:
- getPersistentEntityin interface- PersistenceEventContext<T>
- Returns:
- The RuntimePersistentEntityassociated with the entity
 
 
-