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

public Class BatchEntitySelectFetchInitializer

extends AbstractBatchEntitySelectFetchInitializer
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .List, .Map, org.hibernate.engine.spi.EntityEntry, .EntityKey, .SharedSessionContractImplementor, org.hibernate.internal.log.LoggingHelper, org.hibernate.metamodel.mapping.AttributeMapping, org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping, org.hibernate.persister.entity.EntityPersister, org.hibernate.spi.NavigablePath, org.hibernate.sql.exec.spi.ExecutionContext, org.hibernate.sql.results.graph.DomainResultAssembler, .FetchParentAccess, org.hibernate.sql.results.graph.entity.EntityInitializer, org.hibernate.sql.results.jdbc.spi.RowProcessingState

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private Map<EntityKey, List<BatchEntitySelectFetchInitializer.ParentInfo>>
Inherited from org.hibernate.sql.results.graph.entity.internal.AbstractBatchEntitySelectFetchInitializer:
concreteDescriptorentityKeyfirstEntityInitializeridentifierAssemblerinitializedEntityInstanceparentAccessreferencedModelPartstate

Constructor Summary

AccessConstructor and Description
public
BatchEntitySelectFetchInitializer(FetchParentAccess parentAccess, ToOneAttributeMapping referencedModelPart, NavigablePath fetchedNavigable, EntityPersister concreteDescriptor, DomainResultAssembler<?> identifierAssembler)

Method Summary

Modifier and TypeMethod and Description
public void
endLoading(ExecutionContext context)

Overrides default org.hibernate.sql.results.graph.Initializer.endLoading.

Lifecycle method called at the very end of the result values processing
private List<BatchEntitySelectFetchInitializer.ParentInfo>
public boolean
protected 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.
protected static void
setInstance(EntityInitializer entityInitializer, ToOneAttributeMapping referencedModelPart, String propertyName, int propertyIndex, SharedSessionContractImplementor session, Object instance, Object parentInstance, EntityEntry entry)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
private static void
updateParentEntityLoadedState(EntityInitializer entityInitializer, String propertyName, int propertyIndex, SharedSessionContractImplementor session, Object instance, EntityEntry entry)

Inherited from org.hibernate.sql.results.graph.entity.internal.AbstractBatchEntitySelectFetchInitializer:
finishUpRowgetConcreteDescriptorgetEntityDescriptorgetEntityInstancegetEntityKeygetExistingInitializedInstancegetFetchParentAccessgetInitializedPartgetNavigablePathgetParentEntityAttributegetParentKeyinitializeInstanceloadInstanceregisterResolutionListenerregisterToBatchFetchQueueresolveKeyresolveKey

Field Detail

toBatchLoadback to summary
private Map<EntityKey, List<BatchEntitySelectFetchInitializer.ParentInfo>> toBatchLoad

Constructor Detail

BatchEntitySelectFetchInitializerback to summary
public BatchEntitySelectFetchInitializer(FetchParentAccess parentAccess, ToOneAttributeMapping referencedModelPart, NavigablePath fetchedNavigable, EntityPersister concreteDescriptor, DomainResultAssembler<?> identifierAssembler)

Method Detail

endLoadingback to summary
public void endLoading(ExecutionContext context)

Overrides default org.hibernate.sql.results.graph.Initializer.endLoading.

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

Lifecycle method called at the very end of the result values processing

Annotations
@Override
getParentInfosback to summary
private List<BatchEntitySelectFetchInitializer.ParentInfo> getParentInfos()
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
registerResolutionListenerback to summary
protected void registerResolutionListener()

Implements abstract org.hibernate.sql.results.graph.entity.internal.AbstractBatchEntitySelectFetchInitializer.registerResolutionListener.

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
setInstanceback to summary
protected static void setInstance(EntityInitializer entityInitializer, ToOneAttributeMapping referencedModelPart, String propertyName, int propertyIndex, SharedSessionContractImplementor session, Object instance, Object parentInstance, EntityEntry entry)
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
updateParentEntityLoadedStateback to summary
private static void updateParentEntityLoadedState(EntityInitializer entityInitializer, String propertyName, int propertyIndex, SharedSessionContractImplementor session, Object instance, EntityEntry entry)
org.hibernate.sql.results.graph.entity.internal back to summary

private Class BatchEntitySelectFetchInitializer.ParentInfo

extends Object
Class Inheritance
  • java.lang.Object
  • org.hibernate.sql.results.graph.entity.internal.BatchEntitySelectFetchInitializer.ParentInfo

Field Summary

Modifier and TypeField and Description
private final Object
private final int

Constructor Summary

AccessConstructor and Description
public
ParentInfo(Object parentInstance, int propertyIndex)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

parentInstanceback to summary
private final Object parentInstance
propertyIndexback to summary
private final int propertyIndex

Constructor Detail

ParentInfoback to summary
public ParentInfo(Object parentInstance, int propertyIndex)