public final class TwoPhaseLoad
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addUninitializedCachedEntity(EntityKey key,
java.lang.Object object,
EntityPersister persister,
LockMode lockMode,
java.lang.Object version,
SharedSessionContractImplementor session)
Same as
addUninitializedEntity(org.hibernate.engine.spi.EntityKey, java.lang.Object, org.hibernate.persister.entity.EntityPersister, org.hibernate.LockMode, org.hibernate.engine.spi.SharedSessionContractImplementor) , but here for an entity from the second level cache |
static void |
addUninitializedEntity(EntityKey key,
java.lang.Object object,
EntityPersister persister,
LockMode lockMode,
SharedSessionContractImplementor session)
Add an uninitialized instance of an entity class, as a placeholder to ensure object
identity.
|
static void |
initializeEntity(java.lang.Object entity,
boolean readOnly,
SharedSessionContractImplementor session,
PreLoadEvent preLoadEvent)
Perform the second step of 2-phase load.
|
static void |
postHydrate(EntityPersister persister,
java.io.Serializable id,
java.lang.Object[] values,
java.lang.Object rowId,
java.lang.Object object,
LockMode lockMode,
SharedSessionContractImplementor session)
Register the "hydrated" state of an entity instance, after the first step of 2-phase loading.
|
static void |
postLoad(java.lang.Object entity,
SharedSessionContractImplementor session,
PostLoadEvent postLoadEvent)
PostLoad cannot occur during initializeEntity, as that call occurs *before*
the Set collections are added to the persistence context by Loader.
|
public static void postHydrate(EntityPersister persister, java.io.Serializable id, java.lang.Object[] values, java.lang.Object rowId, java.lang.Object object, LockMode lockMode, SharedSessionContractImplementor session)
persister
- The persister for the hydrated entityid
- The entity identifiervalues
- The entity valuesrowId
- The rowId for the entityobject
- An optional instance for the entity being loadedlockMode
- The lock modesession
- The Sessionpublic static void initializeEntity(java.lang.Object entity, boolean readOnly, SharedSessionContractImplementor session, PreLoadEvent preLoadEvent)
After processing a JDBC result set, we "resolve" all the associations between the entities which were instantiated and had their state "hydrated" into an array
entity
- The entity being loadedreadOnly
- Is the entity being loaded as read-onlysession
- The SessionpreLoadEvent
- The (re-used) pre-load eventpublic static void postLoad(java.lang.Object entity, SharedSessionContractImplementor session, PostLoadEvent postLoadEvent)
entity
- The entitysession
- The SessionpostLoadEvent
- The (re-used) post-load eventpublic static void addUninitializedEntity(EntityKey key, java.lang.Object object, EntityPersister persister, LockMode lockMode, SharedSessionContractImplementor session)
key
- The entity keyobject
- The entity instancepersister
- The entity persisterlockMode
- The lock modesession
- The Sessionpublic static void addUninitializedCachedEntity(EntityKey key, java.lang.Object object, EntityPersister persister, LockMode lockMode, java.lang.Object version, SharedSessionContractImplementor session)
addUninitializedEntity(org.hibernate.engine.spi.EntityKey, java.lang.Object, org.hibernate.persister.entity.EntityPersister, org.hibernate.LockMode, org.hibernate.engine.spi.SharedSessionContractImplementor)
, but here for an entity from the second level cachekey
- The entity keyobject
- The entity instancepersister
- The entity persisterlockMode
- The lock modeversion
- The versionsession
- The SessionCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.