| Modifier and Type | Class and Description |
|---|---|
| public static interface | TwoPhaseLoad.EntityResolver
Implementations determine how a to-one associations is resolved. |
| Modifier and Type | Field and Description |
|---|---|
| private static final CoreMessageLogger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | addUninitializedCachedEntity(final EntityKey
The entity key key, final Object The entity instance object, final EntityPersister The entity persister persister, final LockMode The lock mode lockMode, final Object The version version, final SharedSessionContractImplementor The Session session)Same as |
| public static void | addUninitializedEntity(final EntityKey
The entity key key, final Object The entity instance object, final EntityPersister The entity persister persister, final LockMode The lock mode lockMode, final SharedSessionContractImplementor The Session session)Add an uninitialized instance of an entity class, as a placeholder to ensure object identity. |
| public static void | afterInitialize(final Object
The entity being loaded entity, final SharedSessionContractImplementor The Session session)Perform the afterInitialize() step. |
| private static Boolean | Returns: null if there is no overriding, true if it is overridden to eager and false if it is overridden to lazysession session, final String entity name entityName, final String association name associationName, final Type association type associationType, final boolean if debug log level enabled isDebugEnabled)Check if eager of the association is overridden (i.e. skipping metamodel strategy), including (order sensitive):
|
| public static void | initializeEntity(final Object
The entity being loaded entity, final boolean Is the entity being loaded as read-only readOnly, final SharedSessionContractImplementor The Session session, final PreLoadEvent The (re-used) pre-load event preLoadEvent)
Deprecated
as a consequence of
Perform the second step of 2-phase load.
PreLoadEvent being deprecated.
|
| public static void | initializeEntity(final Object
The entity being loaded entity, final boolean Is the entity being loaded as read-only readOnly, final SharedSessionContractImplementor The Session session, final PreLoadEvent The (re-used) pre-load event preLoadEvent, final TwoPhaseLoad.the resolver used for to-one entity associations
(not used when an entity is a bytecode-enhanced lazy entity) entityResolver
Deprecated
as a consequence of
Perform the second step of 2-phase load.
PreLoadEvent being deprecated.
|
| public static void | initializeEntityEntryLoadedState(final Object entity, final EntityEntry entityEntry, final SharedSessionContractImplementor session, final TwoPhaseLoad.
|
| public static void | initializeEntityFromEntityEntryLoadedState(final Object entity, final EntityEntry entityEntry, final boolean readOnly, final SharedSessionContractImplementor session, final PreLoadEvent preLoadEvent)
Deprecated
as a consequence of
PreLoadEvent being deprecated.
|
| private static Boolean | isEagerFetchProfile(SharedSessionContractImplementor session, String entityName, String associationName)
|
| public static void | postHydrate(final EntityPersister
The persister for the hydrated entity persister, final Serializable The entity identifier id, final Object[] The entity values values, final Object The rowId for the entity rowId, final Object An optional instance for the entity being loaded object, final LockMode The lock mode lockMode, final SharedSessionContractImplementor The Session session)Register the "hydrated" state of an entity instance, after the first step of 2-phase loading. |
| public static void | postLoad(final Object entity, final SharedSessionContractImplementor session, final PostLoadEvent postLoadEvent, final Iterable<PostLoadEventListener> postLoadEventListeners)
Deprecated
Use
This method will be removed.
postLoad(Object, SharedSessionContractImplementor, PostLoadEvent)
instead.
|
| public static void | postLoad(final Object
The entity entity, final SharedSessionContractImplementor The Session session, final PostLoadEvent The (re-used) post-load event postLoadEvent)PostLoad cannot occur during initializeEntity, as that call occurs *before* the Set collections are added to the persistence context by Loader. |
| private static boolean |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| TwoPhaseLoad | back to summary |
|---|---|
| private TwoPhaseLoad() | |
| addUninitializedCachedEntity | back to summary |
|---|---|
| public static void addUninitializedCachedEntity(final EntityKey key, final Object object, final EntityPersister persister, final LockMode lockMode, final Object version, final SharedSessionContractImplementor session) Same as
| |
| addUninitializedEntity | back to summary |
|---|---|
| public static void addUninitializedEntity(final EntityKey key, final Object object, final EntityPersister persister, final LockMode lockMode, final SharedSessionContractImplementor session) Add an uninitialized instance of an entity class, as a placeholder to ensure object identity. Must be called before postHydrate(). Create a "temporary" entry for a newly instantiated entity. The entity is uninitialized, but we need the mapping from id to instance in order to guarantee uniqueness.
| |
| afterInitialize | back to summary |
|---|---|
| public static void afterInitialize(final Object entity, final SharedSessionContractImplementor session) Perform the afterInitialize() step. This needs to be done after the collections have been properly initialized thus a separate step.
| |
| getOverridingEager | back to summary |
|---|---|
| private static Boolean getOverridingEager(final SharedSessionContractImplementor session, final String entityName, final String associationName, final Type associationType, final boolean isDebugEnabled) Check if eager of the association is overridden (i.e. skipping metamodel strategy), including (order sensitive):
| |
| initializeEntity | back to summary |
|---|---|
| public static void initializeEntity(final Object entity, final boolean readOnly, final SharedSessionContractImplementor session, final PreLoadEvent preLoadEvent)
Deprecated as a consequence of Perform the second step of 2-phase load. Fully initialize the entity instance. 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
| |
| initializeEntity | back to summary |
|---|---|
| public static void initializeEntity(final Object entity, final boolean readOnly, final SharedSessionContractImplementor session, final PreLoadEvent preLoadEvent, final TwoPhaseLoad. Deprecated as a consequence of Perform the second step of 2-phase load. Fully initialize the entity instance. 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
| |
| initializeEntityEntryLoadedState | back to summary |
|---|---|
| public static void initializeEntityEntryLoadedState(final Object entity, final EntityEntry entityEntry, final SharedSessionContractImplementor session, final TwoPhaseLoad. | |
| initializeEntityFromEntityEntryLoadedState | back to summary |
|---|---|
| public static void initializeEntityFromEntityEntryLoadedState(final Object entity, final EntityEntry entityEntry, final boolean readOnly, final SharedSessionContractImplementor session, final PreLoadEvent preLoadEvent) throws HibernateException
Deprecated as a consequence of | |
| isEagerFetchProfile | back to summary |
|---|---|
| private static Boolean isEagerFetchProfile(SharedSessionContractImplementor session, String entityName, String associationName) | |
| postHydrate | back to summary |
|---|---|
| public static void postHydrate(final EntityPersister persister, final Serializable id, final Object[] values, final Object rowId, final Object object, final LockMode lockMode, final SharedSessionContractImplementor session) Register the "hydrated" state of an entity instance, after the first step of 2-phase loading. Add the "hydrated state" (an array) of an uninitialized entity to the session. We don't try to resolve any associations yet, because there might be other entities waiting to be read from the JDBC result set we are currently processing
| |
| postLoad | back to summary |
|---|---|
| public static void postLoad(final Object entity, final SharedSessionContractImplementor session, final PostLoadEvent postLoadEvent, final Iterable<PostLoadEventListener> postLoadEventListeners)
Deprecated Use This method will be removed.
| |
| postLoad | back to summary |
|---|---|
| public static void postLoad(final Object entity, final SharedSessionContractImplementor session, final PostLoadEvent postLoadEvent) PostLoad cannot occur during initializeEntity, as that call occurs *before* the Set collections are added to the persistence context by Loader. Without the split, LazyInitializationExceptions can occur in the Entity's postLoad if it acts upon the collection. HHH-6043
| |
| useMinimalPuts | back to summary |
|---|---|
| private static boolean useMinimalPuts(SharedSessionContractImplementor session, EntityEntry entityEntry) | |
initializeEntity(Object, boolean, SharedSessionContractImplementor, PreLoadEvent, EntityResolver)
| Modifier and Type | Field and Description |
|---|---|
| public static final TwoPhaseLoad. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | resolve(EntityType entityType, Object value, SharedSessionContractImplementor session, Object owner, Boolean overridingEager)
|
| DEFAULT | back to summary |
|---|---|
| public static final TwoPhaseLoad. | |
| resolve | back to summary |
|---|---|
| public Object resolve(EntityType entityType, Object value, SharedSessionContractImplementor session, Object owner, Boolean overridingEager) | |