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

public Class EntitySelectFetchInitializer

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
Known Direct Subclasses
org.hibernate.sql.results.graph.entity.internal.EntitySelectFetchByUniqueKeyInitializer
Imports
java.util.function.Consumer, org.hibernate.FetchNotFoundException, .Hibernate, org.hibernate.annotations.NotFoundAction, org.hibernate.engine.spi.EntityHolder, .EntityKey, .PersistenceContext, .SharedSessionContractImplementor, org.hibernate.internal.log.LoggingHelper, org.hibernate.internal.util.StringHelper, org.hibernate.metamodel.mapping.ForeignKeyDescriptor, .ModelPart, org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping, org.hibernate.persister.entity.EntityPersister, org.hibernate.proxy.HibernateProxy, .LazyInitializer, org.hibernate.spi.NavigablePath, .EntityIdentifierNavigablePath, org.hibernate.sql.results.graph.AbstractFetchParentAccess, .DomainResultAssembler, .FetchParentAccess, org.hibernate.sql.results.graph.entity.EntityInitializer, .EntityLoadingLogging, org.hibernate.sql.results.jdbc.spi.RowProcessingState

Author
Andrea Boriero

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static enum

Field Summary

Modifier and TypeField and Description
private static final String
protected final EntityPersister
protected Object
protected Object
private final boolean
protected final DomainResultAssembler<?>
protected final FetchParentAccess
protected EntitySelectFetchInitializer.State
private final ToOneAttributeMapping

Constructor Summary

AccessConstructor and Description
public
EntitySelectFetchInitializer(FetchParentAccess parentAccess, ToOneAttributeMapping toOneMapping, NavigablePath fetchedNavigable, EntityPersister concreteDescriptor, DomainResultAssembler<?> keyAssembler)

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
public ModelPart
public NavigablePath
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 boolean
public 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.
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

CONCRETE_NAMEback to summary
private static final String CONCRETE_NAME
concreteDescriptorback to summary
protected final EntityPersister concreteDescriptor
entityIdentifierback to summary
protected Object entityIdentifier
entityInstanceback to summary
protected Object entityInstance
isEnhancedForLazyLoadingback to summary
private final boolean isEnhancedForLazyLoading
keyAssemblerback to summary
protected final DomainResultAssembler<?> keyAssembler
parentAccessback to summary
protected final FetchParentAccess parentAccess
stateback to summary
protected EntitySelectFetchInitializer.State state
toOneMappingback to summary
private final ToOneAttributeMapping toOneMapping

Constructor Detail

EntitySelectFetchInitializerback to summary
public EntitySelectFetchInitializer(FetchParentAccess parentAccess, ToOneAttributeMapping toOneMapping, NavigablePath fetchedNavigable, EntityPersister concreteDescriptor, DomainResultAssembler<?> keyAssembler)

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
getInitializedPartback to summary
public ModelPart getInitializedPart()

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

getNavigablePathback to summary
public NavigablePath getNavigablePath()

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

Annotations
@Override
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
isAttributeAssignableToConcreteDescriptorback to summary
protected boolean isAttributeAssignableToConcreteDescriptor()
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
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
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
org.hibernate.sql.results.graph.entity.internal back to summary

protected final Enum EntitySelectFetchInitializer.State

extends Enum<EntitySelectFetchInitializer.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final EntitySelectFetchInitializer.State
public static final EntitySelectFetchInitializer.State
public static final EntitySelectFetchInitializer.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static EntitySelectFetchInitializer.State
public static EntitySelectFetchInitializer.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INITIALIZEDback to summary
public static final EntitySelectFetchInitializer.State INITIALIZED
RESOLVEDback to summary
public static final EntitySelectFetchInitializer.State RESOLVED
UNINITIALIZEDback to summary
public static final EntitySelectFetchInitializer.State UNINITIALIZED

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static EntitySelectFetchInitializer.State valueOf(String name)
valuesback to summary
public static EntitySelectFetchInitializer.State[] values()