Top Description Constructors Methods
org.hibernate.proxy.map

public Class MapLazyInitializer

extends AbstractLazyInitializer
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, java.util.Map, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.proxy.AbstractLazyInitializer

Lazy initializer for "dynamic-map" entity representations.
Author
Gavin King

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Map<K, V>
public Class<T>
getPersistentClass()

Implements org.hibernate.proxy.LazyInitializer.getPersistentClass.

Get the actual class of the entity.
protected String
protected boolean
isAllowLoadOutsideTransaction()

Overrides org.hibernate.proxy.AbstractLazyInitializer.isAllowLoadOutsideTransaction.

Get whether the proxy can load data even if it's not attached to a session with an ongoing transaction.
protected void
prepareForPossibleLoadingOutsideTransaction()

Overrides org.hibernate.proxy.AbstractLazyInitializer.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.
Inherited from org.hibernate.proxy.AbstractLazyInitializer:
getEntityNamegetIdentifiergetImplementationgetImplementationgetInternalIdentifiergetSessiongetTargetinitializeinitializeWithoutLoadIfPossibleisConnectedToSessionisReadOnlyisReadOnlyBeforeAttachedToSessionisReadOnlySettingAvailableisUninitializedisUnwrappermissiveInitializationsetIdentifiersetImplementationsetReadOnlysetSessionsetUnwrapunsetSession

Constructor Detail

MapLazyInitializerback to summary
pack-priv MapLazyInitializer(String entityName, Serializable id, SharedSessionContractImplementor session)

Method Detail

getMapback to summary
public Map<K, V> getMap()
getPersistentClassback to summary
public Class<T> getPersistentClass()

Implements org.hibernate.proxy.LazyInitializer.getPersistentClass.

Doc from org.hibernate.proxy.LazyInitializer.getPersistentClass.

Get the actual class of the entity. Generally, getEntityName() should be used instead.

Returns:Class<T>

The actual entity class.

getSessionFactoryUuidback to summary
protected String getSessionFactoryUuid()

Overrides org.hibernate.proxy.AbstractLazyInitializer.getSessionFactoryUuid.

Doc from org.hibernate.proxy.AbstractLazyInitializer.getSessionFactoryUuid.

Get the session factory UUID. This method should only be called during serialization, and only makes sense after a call to prepareForPossibleLoadingOutsideTransaction().

Returns:String

the session factory UUID.

Annotations
@Override
isAllowLoadOutsideTransactionback to summary
protected boolean isAllowLoadOutsideTransaction()

Overrides org.hibernate.proxy.AbstractLazyInitializer.isAllowLoadOutsideTransaction.

Doc from org.hibernate.proxy.AbstractLazyInitializer.isAllowLoadOutsideTransaction.

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 prepareForPossibleLoadingOutsideTransaction().

Returns:boolean

true if out-of-transaction loads are allowed, false otherwise.

Annotations
@Override
prepareForPossibleLoadingOutsideTransactionback to summary
protected void prepareForPossibleLoadingOutsideTransaction()

Overrides org.hibernate.proxy.AbstractLazyInitializer.prepareForPossibleLoadingOutsideTransaction.

Doc from org.hibernate.proxy.AbstractLazyInitializer.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. This method only has any effect if SessionFactoryOptions#isInitializeLazyStateOutsideTransactionsEnabled() is true.

Annotations
@Override