Package org.hibernate.proxy.map
Class MapLazyInitializer
- java.lang.Object
-
- org.hibernate.proxy.AbstractLazyInitializer
-
- org.hibernate.proxy.map.MapLazyInitializer
-
- All Implemented Interfaces:
Serializable,LazyInitializer
public class MapLazyInitializer extends AbstractLazyInitializer implements Serializable
Lazy initializer for "dynamic-map" entity representations.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MapgetMap()ClassgetPersistentClass()Get the actual class of the entity.protected StringgetSessionFactoryUuid()Get the session factory UUID.protected booleanisAllowLoadOutsideTransaction()Get whether the proxy can load data even if it's not attached to a session with an ongoing transaction.protected voidprepareForPossibleLoadingOutsideTransaction()Initialize internal state based on the currently attached session, in order to be ready to load data even after the proxy is detached from the session.-
Methods inherited from class org.hibernate.proxy.AbstractLazyInitializer
getEntityName, getIdentifier, getImplementation, getImplementation, getInternalIdentifier, getSession, getTarget, initialize, initializeWithoutLoadIfPossible, isConnectedToSession, isReadOnly, isReadOnlyBeforeAttachedToSession, isReadOnlySettingAvailable, isUninitialized, isUnwrap, permissiveInitialization, setIdentifier, setImplementation, setReadOnly, setSession, setUnwrap, unsetSession
-
-
-
-
Method Detail
-
getMap
public Map getMap()
-
getPersistentClass
public Class getPersistentClass()
Description copied from interface:LazyInitializerGet the actual class of the entity. Generally,LazyInitializer.getEntityName()should be used instead.- Specified by:
getPersistentClassin interfaceLazyInitializer- Returns:
- The actual entity class.
-
prepareForPossibleLoadingOutsideTransaction
protected void prepareForPossibleLoadingOutsideTransaction()
Description copied from class:AbstractLazyInitializerInitialize internal state based on the currently attached session, in order to be ready to load data even after the proxy is detached from the session. This method only has any effect ifSessionFactoryOptions.isInitializeLazyStateOutsideTransactionsEnabled()istrue.- Overrides:
prepareForPossibleLoadingOutsideTransactionin classAbstractLazyInitializer
-
isAllowLoadOutsideTransaction
protected boolean isAllowLoadOutsideTransaction()
Description copied from class:AbstractLazyInitializerGet whether the proxy can load data even if it's not attached to a session with an ongoing transaction. This method should only be called during serialization, and only makes sense after a call toAbstractLazyInitializer.prepareForPossibleLoadingOutsideTransaction().- Overrides:
isAllowLoadOutsideTransactionin classAbstractLazyInitializer- Returns:
trueif out-of-transaction loads are allowed,falseotherwise.
-
getSessionFactoryUuid
protected String getSessionFactoryUuid()
Description copied from class:AbstractLazyInitializerGet the session factory UUID. This method should only be called during serialization, and only makes sense after a call toAbstractLazyInitializer.prepareForPossibleLoadingOutsideTransaction().- Overrides:
getSessionFactoryUuidin classAbstractLazyInitializer- Returns:
- the session factory UUID.
-
-