public final class TwoPhaseLoad extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addUninitializedCachedEntity(EntityKey key,
Object object,
EntityPersister persister,
LockMode lockMode,
Object version,
SessionImplementor session)
Same as
addUninitializedEntity(org.hibernate.engine.spi.EntityKey, java.lang.Object, org.hibernate.persister.entity.EntityPersister, org.hibernate.LockMode, org.hibernate.engine.spi.SessionImplementor) , but here for an entity from the second level cache |
static void |
addUninitializedEntity(EntityKey key,
Object object,
EntityPersister persister,
LockMode lockMode,
SessionImplementor session)
Add an uninitialized instance of an entity class, as a placeholder to ensure object
identity.
|
static void |
initializeEntity(Object entity,
boolean readOnly,
SessionImplementor session,
PreLoadEvent preLoadEvent)
Perform the second step of 2-phase load.
|
static void |
postHydrate(EntityPersister persister,
Serializable id,
Object[] values,
Object rowId,
Object object,
LockMode lockMode,
SessionImplementor session)
Register the "hydrated" state of an entity instance, after the first step of 2-phase loading.
|
static void |
postLoad(Object entity,
SessionImplementor 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, Serializable id, Object[] values, Object rowId, Object object, LockMode lockMode, SessionImplementor 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(Object entity, boolean readOnly, SessionImplementor session, PreLoadEvent preLoadEvent)
entity
- The entity being loadedreadOnly
- Is the entity being loaded as read-onlysession
- The SessionpreLoadEvent
- The (re-used) pre-load eventpublic static void postLoad(Object entity, SessionImplementor session, PostLoadEvent postLoadEvent)
entity
- The entitysession
- The SessionpostLoadEvent
- The (re-used) post-load eventpublic static void addUninitializedEntity(EntityKey key, Object object, EntityPersister persister, LockMode lockMode, SessionImplementor session)
key
- The entity keyobject
- The entity instancepersister
- The entity persisterlockMode
- The lock modesession
- The Sessionpublic static void addUninitializedCachedEntity(EntityKey key, Object object, EntityPersister persister, LockMode lockMode, Object version, SessionImplementor session)
addUninitializedEntity(org.hibernate.engine.spi.EntityKey, java.lang.Object, org.hibernate.persister.entity.EntityPersister, org.hibernate.LockMode, org.hibernate.engine.spi.SessionImplementor)
, 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 © 2017 JBoss by Red Hat. All rights reserved.