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 Class<?>
getImplementationClass()
Get the actual class of the entity, possibly initializing the entity if it has subclasses.Map
getMap()
Class<?>
getPersistentClass()
Get the actual class of the entity.protected String
getSessionFactoryName()
Get the session factory name.protected String
getSessionFactoryUuid()
Get the session factory UUID.protected boolean
isAllowLoadOutsideTransaction()
Get whether the proxy can load data even if it's not attached to a session with an ongoing transaction.protected void
prepareForPossibleLoadingOutsideTransaction()
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 Detail
-
getMap
public Map getMap()
-
getPersistentClass
public Class<?> 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
public 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
protected String 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
protected String 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.
-
-