Package org.hibernate.engine.spi
Interface EntityHolder
-
@Incubating public interface EntityHolder
Holder for an entry in thePersistenceContext
for anEntityKey
.- Since:
- 6.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description EntityPersister
getDescriptor()
@Nullable Object
getEntity()
The entity object, ornull
if no entity object was registered yet.@Nullable EntityEntry
getEntityEntry()
@Nullable EntityInitializer<?>
getEntityInitializer()
The entity initializer that claims to initialize the entity for this holder.EntityKey
getEntityKey()
default @Nullable Object
getManagedObject()
The proxy if there is one and otherwise the entity.@Nullable Object
getProxy()
The proxy object, ornull
if no proxy object was registered yet.boolean
isDetached()
Whether the entity is detached.boolean
isEventuallyInitialized()
Whether the entity is already initialized or will be initialized through an initializer eventually.boolean
isInitialized()
Whether the entity is already initializedvoid
markAsReloaded(JdbcValuesSourceProcessingState processingState)
Marks the entity holder as reloaded to potentially trigger follow-on locking.void
setEntityEntry(@Nullable EntityEntry entry)
-
-
-
Method Detail
-
getEntityKey
EntityKey getEntityKey()
-
getDescriptor
EntityPersister getDescriptor()
-
getEntity
@Nullable Object getEntity()
The entity object, ornull
if no entity object was registered yet.
-
getProxy
@Nullable Object getProxy()
The proxy object, ornull
if no proxy object was registered yet.
-
getEntityInitializer
@Nullable EntityInitializer<?> getEntityInitializer()
The entity initializer that claims to initialize the entity for this holder. Will benull
if entity is initialized already or the entity holder is not claimed yet.
-
getManagedObject
default @Nullable Object getManagedObject()
The proxy if there is one and otherwise the entity.
-
getEntityEntry
@Nullable EntityEntry getEntityEntry()
-
setEntityEntry
@Internal void setEntityEntry(@Nullable EntityEntry entry)
-
markAsReloaded
void markAsReloaded(JdbcValuesSourceProcessingState processingState)
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.
-
-