Package org.hibernate.proxy.map
Class MapLazyInitializer
java.lang.Object
org.hibernate.proxy.AbstractLazyInitializer
org.hibernate.proxy.map.MapLazyInitializer
- All Implemented Interfaces:
Serializable,LazyInitializer
Lazy initializer for "dynamic-map" entity representations.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionClass<?> Get the actual class of the entity, possibly initializing the entity if it has subclasses.getMap()Class<?> Get the actual class of the entity.protected StringGet the session factory name.protected StringGet the session factory UUID.protected booleanGet whether the proxy can load data even if it's not attached to a session with an ongoing transaction.protected voidInitialize 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, getImplementationEntityName, getInternalIdentifier, getSession, getTarget, initialize, initializeWithoutLoadIfPossible, isConnectedToSession, isReadOnly, isReadOnlyBeforeAttachedToSession, isReadOnlySettingAvailable, isUninitialized, isUnwrap, permissiveInitialization, setIdentifier, setImplementation, setReadOnly, setSession, setUnwrap, unsetSession
-
Method Details
-
getMap
-
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.
-
getImplementationClass
Description copied from interface:LazyInitializerGet the actual class of the entity, possibly initializing the entity if it has subclasses.- Specified by:
getImplementationClassin 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.- 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 to
AbstractLazyInitializer.prepareForPossibleLoadingOutsideTransaction().- Overrides:
isAllowLoadOutsideTransactionin classAbstractLazyInitializer- Returns:
trueif out-of-transaction loads are allowed,falseotherwise.
-
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 to
AbstractLazyInitializer.prepareForPossibleLoadingOutsideTransaction().- Overrides:
getSessionFactoryUuidin classAbstractLazyInitializer- Returns:
- the session factory UUID.
-
getSessionFactoryName
Description copied from class:AbstractLazyInitializerGet the session factory name.This method should only be called during serialization, and only makes sense after a call to
AbstractLazyInitializer.prepareForPossibleLoadingOutsideTransaction().- Overrides:
getSessionFactoryNamein classAbstractLazyInitializer- Returns:
- the session factory name.
-