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 String
Get the session factory name.protected String
Get the session factory UUID.protected boolean
Get whether the proxy can load data even if it's not attached to a session with an ongoing transaction.protected void
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, 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:LazyInitializer
Get the actual class of the entity. Generally,LazyInitializer.getEntityName()
should be used instead.- Specified by:
getPersistentClass
in interfaceLazyInitializer
- Returns:
- The actual entity class.
-
getImplementationClass
Description copied from interface:LazyInitializer
Get the actual class of the entity, possibly initializing the entity if it has subclasses.- Specified by:
getImplementationClass
in interfaceLazyInitializer
- Returns:
- The actual entity class.
-
prepareForPossibleLoadingOutsideTransaction
protected void prepareForPossibleLoadingOutsideTransaction()Description copied from class:AbstractLazyInitializer
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.- Overrides:
prepareForPossibleLoadingOutsideTransaction
in classAbstractLazyInitializer
-
isAllowLoadOutsideTransaction
protected boolean isAllowLoadOutsideTransaction()Description copied from class:AbstractLazyInitializer
Get 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:
isAllowLoadOutsideTransaction
in classAbstractLazyInitializer
- Returns:
true
if out-of-transaction loads are allowed,false
otherwise.
-
getSessionFactoryUuid
Description copied from class:AbstractLazyInitializer
Get the session factory UUID.This method should only be called during serialization, and only makes sense after a call to
AbstractLazyInitializer.prepareForPossibleLoadingOutsideTransaction()
.- Overrides:
getSessionFactoryUuid
in classAbstractLazyInitializer
- Returns:
- the session factory UUID.
-
getSessionFactoryName
Description copied from class:AbstractLazyInitializer
Get the session factory name.This method should only be called during serialization, and only makes sense after a call to
AbstractLazyInitializer.prepareForPossibleLoadingOutsideTransaction()
.- Overrides:
getSessionFactoryName
in classAbstractLazyInitializer
- Returns:
- the session factory name.
-