Top Description Methods
org.hibernate.engine.spi

public Interface EntityHolder

Known Direct Implementers
org.hibernate.engine.internal.StatefulPersistenceContext.EntityHolderImpl
Annotations
@Incubating
Imports
org.hibernate.Incubating, org.hibernate.persister.entity.EntityPersister, org.hibernate.sql.results.graph.entity.EntityInitializer, org.hibernate.sql.results.jdbc.spi.JdbcValuesSourceProcessingState, org.checkerframework.checker.nullness.qual.Nullable

Holder for an entry in the PersistenceContext for an EntityKey.
Since
6.4

Method Summary

Modifier and TypeMethod and Description
public EntityPersister
public @Nullable Object
getEntity()

The entity object, or null if no entity object was registered yet.

public @Nullable EntityInitializer
getEntityInitializer()

The entity initializer that claims to initialize the entity for this holder.

public EntityKey
public default @Nullable Object
getManagedObject()

The proxy if there is one and otherwise the entity.

public @Nullable Object
getProxy()

The proxy object, or null if no proxy object was registered yet.

public boolean
isEventuallyInitialized()

Whether the entity is already initialized or will be initialized through an initializer eventually.

public void
markAsReloaded(JdbcValuesSourceProcessingState
The processing state within which this entity is reloaded.
processingState
)

Marks the entity holder as reloaded to potentially trigger follow-on locking.

Method Detail

getDescriptorback to summary
public EntityPersister getDescriptor()
getEntityback to summary
public @Nullable Object getEntity()

The entity object, or null if no entity object was registered yet.

getEntityInitializerback to summary
public @Nullable EntityInitializer getEntityInitializer()

The entity initializer that claims to initialize the entity for this holder. Will be null if entity is initialized already or the entity holder is not claimed yet.

getEntityKeyback to summary
public EntityKey getEntityKey()
getManagedObjectback to summary
public default @Nullable Object getManagedObject()

The proxy if there is one and otherwise the entity.

getProxyback to summary
public @Nullable Object getProxy()

The proxy object, or null if no proxy object was registered yet.

isEventuallyInitializedback to summary
public boolean isEventuallyInitialized()

Whether the entity is already initialized or will be initialized through an initializer eventually.

markAsReloadedback to summary
public void markAsReloaded(JdbcValuesSourceProcessingState processingState)

Marks the entity holder as reloaded to potentially trigger follow-on locking.

Parameters
processingState:JdbcValuesSourceProcessingState

The processing state within which this entity is reloaded.