Package org.hibernate.engine.spi
Interface EntityHolder
Holder for an entry in the
PersistenceContext for an EntityKey.- Since:
- 6.4
-
Method Summary
Modifier and TypeMethodDescription@Nullable ObjectThe entity object, ornullif no entity object was registered yet.@Nullable EntityEntry@Nullable EntityInitializer<?> The entity initializer that claims to initialize the entity for this holder.default @Nullable ObjectThe proxy if there is one and otherwise the entity.@Nullable ObjectgetProxy()The proxy object, ornullif no proxy object was registered yet.booleanWhether the entity is detached.booleanWhether the entity is already initialized or will be initialized through an initializer eventually.booleanWhether the entity is already initializedvoidmarkAsReloaded(JdbcValuesSourceProcessingState processingState) Marks the entity holder as reloaded to potentially trigger follow-on locking.voidFor Hibernate Reactive Set the EntityInitializer to nullvoidsetEntityEntry(@Nullable EntityEntry entry)
-
Method Details
-
getEntityKey
EntityKey getEntityKey() -
getDescriptor
EntityPersister getDescriptor() -
getEntity
@Nullable Object getEntity()The entity object, ornullif no entity object was registered yet. -
getProxy
@Nullable Object getProxy()The proxy object, ornullif no proxy object was registered yet. -
getEntityInitializer
@Nullable EntityInitializer<?> getEntityInitializer()The entity initializer that claims to initialize the entity for this holder. Will benullif entity is initialized already or the entity holder is not claimed yet. -
getManagedObject
The proxy if there is one and otherwise the entity. -
getEntityEntry
@Nullable EntityEntry getEntityEntry() -
setEntityEntry
-
markAsReloaded
Marks the entity holder as reloaded to potentially trigger follow-on locking.- Parameters:
processingState- The processing state within which this entity is reloaded.
-
isInitialized
boolean isInitialized()Whether the entity is already initialized -
isEventuallyInitialized
boolean isEventuallyInitialized()Whether the entity is already initialized or will be initialized through an initializer eventually. -
isDetached
boolean isDetached()Whether the entity is detached. -
resetEntityInitialier
void resetEntityInitialier()For Hibernate Reactive Set the EntityInitializer to null
-