Package org.hibernate.event.spi
Class FlushEntityEvent
java.lang.Object
org.hibernate.event.spi.AbstractEvent
org.hibernate.event.spi.FlushEntityEvent
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]
int[]
int
Object[]
boolean
boolean
boolean
boolean
boolean
boolean
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.void
setAllowedToReuse
(boolean allowedToReuse) void
setDatabaseSnapshot
(Object[] databaseSnapshot) void
setDirtyCheckHandledByInterceptor
(boolean dirtyCheckHandledByInterceptor) void
setDirtyCheckPossible
(boolean dirtyCheckPossible) void
setDirtyProperties
(int[] dirtyProperties) void
setHasDirtyCollection
(boolean hasDirtyCollection) void
setInstanceGenerationId
(int instanceGenerationId) void
setPropertyValues
(Object[] propertyValues) Methods inherited from class org.hibernate.event.spi.AbstractEvent
getFactory, getSession
-
Constructor Details
-
FlushEntityEvent
-
-
Method Details
-
getEntityEntry
-
getDatabaseSnapshot
-
setDatabaseSnapshot
-
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
-
setPropertyValues
-
getEntity
-
resetAndReuseEventInstance
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.- Parameters:
entity
- same as constructor parameterentry
- same as constructor parameter
-
isAllowedToReuse
public boolean isAllowedToReuse() -
setAllowedToReuse
public void setAllowedToReuse(boolean allowedToReuse) -
getInstanceGenerationId
public int getInstanceGenerationId() -
setInstanceGenerationId
public void setInstanceGenerationId(int instanceGenerationId)
-