Class FlushEntityEvent

    • Method Detail

      • getDatabaseSnapshot

        public Object[] getDatabaseSnapshot()
      • setDatabaseSnapshot

        public void setDatabaseSnapshot​(Object[] databaseSnapshot)
      • hasDatabaseSnapshot

        public boolean hasDatabaseSnapshot()
      • isDirtyCheckHandledByInterceptor

        public boolean isDirtyCheckHandledByInterceptor()
      • setDirtyCheckHandledByInterceptor

        public void setDirtyCheckHandledByInterceptor​(boolean dirtyCheckHandledByInterceptor)
      • isDirtyCheckPossible

        public boolean isDirtyCheckPossible()
      • setDirtyCheckPossible

        public void setDirtyCheckPossible​(boolean dirtyCheckPossible)
      • getDirtyProperties

        public int[] getDirtyProperties()
      • setDirtyProperties

        public void setDirtyProperties​(int[] dirtyProperties)
      • hasDirtyProperties

        public boolean hasDirtyProperties()
      • hasDirtyCollection

        public boolean hasDirtyCollection()
      • setHasDirtyCollection

        public void setHasDirtyCollection​(boolean hasDirtyCollection)
      • getPropertyValues

        public Object[] getPropertyValues()
      • setPropertyValues

        public void setPropertyValues​(Object[] propertyValues)
      • getEntity

        public Object getEntity()
      • resetAndReuseEventInstance

        public void resetAndReuseEventInstance​(Object entity,
                                               EntityEntry entry)
        This is a terrible anti-pattern, but particular circumstances call for being able to reuse the same event instance: this is otherwise allocated in hot loops and since each event is escaping the scope it's actually causing allocation issues. The flush event does not appear to be used recursively so this is currently safe to do, nevertheless we add an allowedToReuse flag to ensure only instances whose purpose has completed are being reused. N.B. two out of three parameters from the constructor are reset: the same EventSource is implied on reuse.
        entity - same as constructor parameter
        entry - same as constructor parameter
      • isAllowedToReuse

        public boolean isAllowedToReuse()
      • setAllowedToReuse

        public void setAllowedToReuse​(boolean allowedToReuse)
      • getInstanceGenerationId

        public int getInstanceGenerationId()
      • setInstanceGenerationId

        public void setInstanceGenerationId​(int instanceGenerationId)