Class DefaultEntityEventContext<T>

  • Type Parameters:
    T - The entity type
    All Implemented Interfaces:
    io.micronaut.data.event.EntityEventContext<T>, io.micronaut.data.event.PersistenceEventContext<T>

    @Internal
    public class DefaultEntityEventContext<T>
    extends java.lang.Object
    implements io.micronaut.data.event.EntityEventContext<T>
    Default implementation of the EntityEventContext interface.
    Since:
    2.3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultEntityEventContext​(io.micronaut.data.model.runtime.RuntimePersistentEntity<T> persistentEntity, T entity)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getEntity()  
      io.micronaut.data.model.runtime.RuntimePersistentEntity<T> getPersistentEntity()  
      <P> void setProperty​(io.micronaut.core.beans.BeanProperty<T,​P> property, P newValue)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.micronaut.data.event.EntityEventContext

        supportsEventSystem
    • Constructor Detail

      • DefaultEntityEventContext

        public DefaultEntityEventContext​(io.micronaut.data.model.runtime.RuntimePersistentEntity<T> persistentEntity,
                                         T entity)
    • Method Detail

      • getEntity

        @NonNull
        public T getEntity()
        Specified by:
        getEntity in interface io.micronaut.data.event.EntityEventContext<T>
      • setProperty

        public <P> void setProperty​(io.micronaut.core.beans.BeanProperty<T,​P> property,
                                    P newValue)
        Specified by:
        setProperty in interface io.micronaut.data.event.EntityEventContext<T>
      • getPersistentEntity

        public io.micronaut.data.model.runtime.RuntimePersistentEntity<T> getPersistentEntity()
        Specified by:
        getPersistentEntity in interface io.micronaut.data.event.PersistenceEventContext<T>