Class DefaultReactiveFlushEntityEventListener

java.lang.Object
org.hibernate.reactive.event.impl.DefaultReactiveFlushEntityEventListener
All Implemented Interfaces:
org.hibernate.event.spi.FlushEntityEventListener, org.hibernate.jpa.event.spi.CallbackRegistryConsumer

public class DefaultReactiveFlushEntityEventListener extends Object implements org.hibernate.event.spi.FlushEntityEventListener, org.hibernate.jpa.event.spi.CallbackRegistryConsumer
A reactific DefaultFlushEntityEventListener. This implementation is almost, but not quite, a line-for-line copy of DefaultFlushEntityEventListener. The only difference is that it creates ReactiveEntityUpdateActions. Unlike other event listeners in this package, this listener's onFlushEntity(FlushEntityEvent) method does not need to by called in a non-blocking manner, and so therefore there is no ReactiveFlushEntityEventListener interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final Log
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkId(Object object, org.hibernate.persister.entity.EntityPersister persister, Object id, org.hibernate.engine.spi.SessionImplementor session)
    make sure user didn't mangle the id
    protected void
    dirtyCheck(org.hibernate.event.spi.FlushEntityEvent event)
    Perform a dirty check, and attach the results to the event
    protected boolean
    handleInterception(org.hibernate.event.spi.FlushEntityEvent event)
     
    void
    injectCallbackRegistry(org.hibernate.jpa.event.spi.CallbackRegistry callbackRegistry)
     
    protected boolean
    invokeInterceptor(org.hibernate.event.spi.FlushEntityEvent event)
     
    protected final boolean
    isUpdateNecessary(org.hibernate.event.spi.FlushEntityEvent event)
    Performs all necessary checking to determine if an entity needs an SQL update to synchronize its state to the database.
    void
    onFlushEntity(org.hibernate.event.spi.FlushEntityEvent event)
    Flushes a single entity's state to the database, by scheduling an update action, if necessary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOG

      protected static final Log LOG
  • Constructor Details

    • DefaultReactiveFlushEntityEventListener

      public DefaultReactiveFlushEntityEventListener()
  • Method Details

    • injectCallbackRegistry

      public void injectCallbackRegistry(org.hibernate.jpa.event.spi.CallbackRegistry callbackRegistry)
      Specified by:
      injectCallbackRegistry in interface org.hibernate.jpa.event.spi.CallbackRegistryConsumer
    • checkId

      public void checkId(Object object, org.hibernate.persister.entity.EntityPersister persister, Object id, org.hibernate.engine.spi.SessionImplementor session) throws org.hibernate.HibernateException
      make sure user didn't mangle the id
      Throws:
      org.hibernate.HibernateException
    • onFlushEntity

      public void onFlushEntity(org.hibernate.event.spi.FlushEntityEvent event) throws org.hibernate.HibernateException
      Flushes a single entity's state to the database, by scheduling an update action, if necessary
      Specified by:
      onFlushEntity in interface org.hibernate.event.spi.FlushEntityEventListener
      Throws:
      org.hibernate.HibernateException
    • handleInterception

      protected boolean handleInterception(org.hibernate.event.spi.FlushEntityEvent event)
    • invokeInterceptor

      protected boolean invokeInterceptor(org.hibernate.event.spi.FlushEntityEvent event)
    • isUpdateNecessary

      protected final boolean isUpdateNecessary(org.hibernate.event.spi.FlushEntityEvent event) throws org.hibernate.HibernateException
      Performs all necessary checking to determine if an entity needs an SQL update to synchronize its state to the database. Modifies the event by side-effect! Note: this method is quite slow, avoid calling if possible!
      Throws:
      org.hibernate.HibernateException
    • dirtyCheck

      protected void dirtyCheck(org.hibernate.event.spi.FlushEntityEvent event) throws org.hibernate.HibernateException
      Perform a dirty check, and attach the results to the event
      Throws:
      org.hibernate.HibernateException