Top Fields Constructors Methods
org.hibernate.sql.results.graph.entity.internal

public Class EntityDelayedFetchInitializer

extends AbstractFetchParentAccess
implements EntityInitializer
Class Inheritance
All Implemented Interfaces
org.hibernate.sql.results.graph.entity.EntityInitializer, org.hibernate.sql.results.graph.FetchParentAccess, org.hibernate.sql.results.graph.Initializer
Imports
java.util.function.Consumer, org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer, org.hibernate.engine.spi.EntityHolder, .EntityKey, .EntityUniqueKey, .PersistenceContext, .SharedSessionContractImplementor, org.hibernate.internal.log.LoggingHelper, org.hibernate.metamodel.mapping.ModelPart, org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping, org.hibernate.persister.entity.EntityPersister, org.hibernate.proxy.HibernateProxy, .LazyInitializer, org.hibernate.spi.NavigablePath, org.hibernate.sql.results.graph.AbstractFetchParentAccess, .DomainResultAssembler, .FetchParentAccess, org.hibernate.sql.results.graph.entity.EntityInitializer, org.hibernate.sql.results.jdbc.spi.RowProcessingState, org.hibernate.type.Type

Authors
Andrea Boriero, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private Object
private Object
private final DomainResultAssembler<?>
private final FetchParentAccess
private final ToOneAttributeMapping
private final boolean

Constructor Summary

AccessConstructor and Description
public
EntityDelayedFetchInitializer(FetchParentAccess parentAccess, NavigablePath fetchedNavigable, ToOneAttributeMapping referencedModelPart, boolean selectByUniqueKey, DomainResultAssembler<?> identifierAssembler)

Method Summary

Modifier and TypeMethod and Description
public void
finishUpRow(RowProcessingState rowProcessingState)

Implements org.hibernate.sql.results.graph.Initializer.finishUpRow.

Lifecycle method called at the end of the current row processing.
public EntityPersister
public EntityPersister
getEntityDescriptor()

Implements org.hibernate.sql.results.graph.entity.EntityInitializer.getEntityDescriptor.

Get the descriptor for the type of entity being initialized
public Object
getEntityInstance()

Implements org.hibernate.sql.results.graph.entity.EntityInitializer.getEntityInstance.

Get the entity instance for the currently processing "row".
public EntityKey
public FetchParentAccess
protected Object
protected DomainResultAssembler<?>
public ModelPart
public NavigablePath
protected EntityInitializer
public Object
public void
initializeInstance(RowProcessingState rowProcessingState)

Implements org.hibernate.sql.results.graph.Initializer.initializeInstance.

Step 3 - Initialize the state of the instance resolved in resolveInstance from the current row values.
protected static boolean
public boolean
protected boolean
public void
public void
resolveInstance(RowProcessingState rowProcessingState)

Implements org.hibernate.sql.results.graph.Initializer.resolveInstance.

Step 2 - Using the key resolved in resolveKey, resolve the instance (of the thing initialized) to use for the current row.
public void
resolveKey(RowProcessingState rowProcessingState)

Implements org.hibernate.sql.results.graph.Initializer.resolveKey.

Step 1 - Resolve the key value for this initializer for the current row.
protected void
setEntityInstance(Object entityInstance)

protected void
setIdentifier(Object identifier)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.hibernate.sql.results.graph.AbstractFetchParentAccess:
clearResolutionListenersnotifyResolutionListeners

Field Detail

entityInstanceback to summary
private Object entityInstance
identifierback to summary
private Object identifier
identifierAssemblerback to summary
private final DomainResultAssembler<?> identifierAssembler
parentAccessback to summary
private final FetchParentAccess parentAccess
referencedModelPartback to summary
private final ToOneAttributeMapping referencedModelPart
selectByUniqueKeyback to summary
private final boolean selectByUniqueKey

Constructor Detail

EntityDelayedFetchInitializerback to summary
public EntityDelayedFetchInitializer(FetchParentAccess parentAccess, NavigablePath fetchedNavigable, ToOneAttributeMapping referencedModelPart, boolean selectByUniqueKey, DomainResultAssembler<?> identifierAssembler)

Method Detail

finishUpRowback to summary
public void finishUpRow(RowProcessingState rowProcessingState)

Implements org.hibernate.sql.results.graph.Initializer.finishUpRow.

Doc from org.hibernate.sql.results.graph.Initializer.finishUpRow.

Lifecycle method called at the end of the current row processing. Provides ability to complete processing from the current row and prepare for the next row.

Annotations
@Override
getConcreteDescriptorback to summary
public EntityPersister getConcreteDescriptor()

Implements org.hibernate.sql.results.graph.entity.EntityInitializer.getConcreteDescriptor.

Annotations
@Override
getEntityDescriptorback to summary
public EntityPersister getEntityDescriptor()

Implements org.hibernate.sql.results.graph.entity.EntityInitializer.getEntityDescriptor.

Doc from org.hibernate.sql.results.graph.entity.EntityInitializer.getEntityDescriptor.

Get the descriptor for the type of entity being initialized

Annotations
@Override
getEntityInstanceback to summary
public Object getEntityInstance()

Implements org.hibernate.sql.results.graph.entity.EntityInitializer.getEntityInstance.

Doc from org.hibernate.sql.results.graph.entity.EntityInitializer.getEntityInstance.

Get the entity instance for the currently processing "row".

Annotations
@Override
getEntityKeyback to summary
public EntityKey getEntityKey()

Implements org.hibernate.sql.results.graph.entity.EntityInitializer.getEntityKey.

Annotations
@Override
getFetchParentAccessback to summary
public FetchParentAccess getFetchParentAccess()

Overrides default org.hibernate.sql.results.graph.FetchParentAccess.getFetchParentAccess.

Annotations
@Override
getIdentifierback to summary
protected Object getIdentifier()
getIdentifierAssemblerback to summary
protected DomainResultAssembler<?> getIdentifierAssembler()
getInitializedPartback to summary
public ModelPart getInitializedPart()

Implements org.hibernate.sql.results.graph.Initializer.getInitializedPart.

Annotations
@Override
getNavigablePathback to summary
public NavigablePath getNavigablePath()

Implements org.hibernate.sql.results.graph.FetchParentAccess.getNavigablePath.

Annotations
@Override
getParentEntityInitializerback to summary
protected EntityInitializer getParentEntityInitializer(FetchParentAccess parentAccess)
getParentKeyback to summary
public Object getParentKey()

Implements org.hibernate.sql.results.graph.FetchParentAccess.getParentKey.

Annotations
@Override
initializeInstanceback to summary
public void initializeInstance(RowProcessingState rowProcessingState)

Implements org.hibernate.sql.results.graph.Initializer.initializeInstance.

Doc from org.hibernate.sql.results.graph.Initializer.initializeInstance.

Step 3 - Initialize the state of the instance resolved in resolveInstance from the current row values. All resolved state for the current row is injected into the resolved instance

Annotations
@Override
isEnhancedForLazyLoadingback to summary
protected static boolean isEnhancedForLazyLoading(EntityInitializer parentEntityIntialiazer)
isEntityInitializedback to summary
public boolean isEntityInitialized()

Implements org.hibernate.sql.results.graph.entity.EntityInitializer.isEntityInitialized.

Returns:boolean

Doc from org.hibernate.sql.results.graph.entity.EntityInitializer.isEntityInitialized.

true if the current entity associated to this EntityInitializer has been initialized

Annotations
@Override
isSelectByUniqueKeyback to summary
protected boolean isSelectByUniqueKey()
registerResolutionListenerback to summary
public void registerResolutionListener(Consumer<Object> listener)

Overrides org.hibernate.sql.results.graph.AbstractFetchParentAccess.registerResolutionListener.

Implements org.hibernate.sql.results.graph.FetchParentAccess.registerResolutionListener.

Doc from org.hibernate.sql.results.graph.FetchParentAccess.registerResolutionListener.

Register a listener to be notified when the parent is "resolved"

Annotations
@Override
resolveInstanceback to summary
public void resolveInstance(RowProcessingState rowProcessingState)

Implements org.hibernate.sql.results.graph.Initializer.resolveInstance.

Doc from org.hibernate.sql.results.graph.Initializer.resolveInstance.

Step 2 - Using the key resolved in resolveKey, resolve the instance (of the thing initialized) to use for the current row. After this point, the initializer knows the entity/collection/component instance for the current row based on the resolved key todo (6.0) : much of the various implementations of this are similar enough to handle in a common base implementation (templating?) things like resolving as managed (Session cache), from second-level cache, from LoadContext, etc..

Annotations
@Override
resolveKeyback to summary
public void resolveKey(RowProcessingState rowProcessingState)

Implements org.hibernate.sql.results.graph.Initializer.resolveKey.

Doc from org.hibernate.sql.results.graph.Initializer.resolveKey.

Step 1 - Resolve the key value for this initializer for the current row. After this point, the initializer knows the entity/collection/component key for the current row

Annotations
@Override
setEntityInstanceback to summary
protected void setEntityInstance(Object entityInstance)
setIdentifierback to summary
protected void setIdentifier(Object identifier)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override