Top Description Fields Constructors Methods
org.hibernate.engine.spi

public Class LoadQueryInfluencers

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, java.util.Collections, .HashMap, .HashSet, .Map, .Set, java.util.function.Supplier, org.hibernate.Filter, .Internal, .UnknownProfileException, org.hibernate.engine.profile.Fetch, .FetchProfile, org.hibernate.graph.GraphSemantic, org.hibernate.graph.spi.RootGraphImplementor, org.hibernate.internal.FilterImpl, .SessionCreationOptions, org.hibernate.loader.ast.spi.CascadingFetchProfile, org.hibernate.persister.collection.CollectionPersister, org.hibernate.persister.entity.EntityPersister, org.checkerframework.checker.nullness.qual.Nullable

Centralize all options which can influence the SQL query needed to load an entity. Currently, such influencers are defined as:
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private int
private final EffectiveEntityGraph
private CascadingFetchProfile
private HashSet<String>
private HashMap<String, Filter>
private Boolean
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private boolean

Constructor Summary

AccessConstructor and Description
public
LoadQueryInfluencers(SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public
LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, SessionCreationOptions options)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
public @Nullable HashSet<String>
adjustFetchProfiles(@Nullable Set<String> disabledFetchProfiles, @Nullable Set<String> enabledFetchProfiles)

public EffectiveEntityGraph
private void
public void
public void
disableFilter(String filterName)

public int
public int
public boolean
public boolean
public boolean
public void
public Filter
enableFilter(String filterName)

public <T> T
public int
public EffectiveEntityGraph
public CascadingFetchProfile
getEnabledCascadingFetchProfile()

Fetch-profile to apply, if one, when building the result-graph for cascade fetching - for example, the result-graph used when handling a merge to immediately load additional based on jakarta.persistence.CascadeType#MERGE

public Set<String>
public @Nullable Filter
public Set<String>

Returns:

an unmodifiable Set of enabled filter names.
getEnabledFilterNames
()

Returns an unmodifiable Set of enabled filter names.

public Map<String, Filter>
public Object
getFilterParameterValue(String filterParameterName)

public String
getInternalFetchProfile()

Deprecated since 6.0. Use getEnabledCascadingFetchProfile instead
public Boolean
public SessionFactoryImplementor
getSessionFactory()

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public boolean
public boolean
public boolean
public boolean
public boolean
private boolean
public boolean
private boolean
public static String[]
parseFilterParameterName(String filterParameterName)

public void
setBatchSize(int batchSize)

public void
setEnabledCascadingFetchProfile(CascadingFetchProfile enabledCascadingFetchProfile)

Set the effective cascading fetch-profile

public void
setEnabledFetchProfileNames(HashSet<String> enabledFetchProfileNames)

public void
setInternalFetchProfile(String internalFetchProfile)

Deprecated since 6.0. Use setEnabledCascadingFetchProfile instead
public void
setReadOnly(Boolean readOnly)

public void
setSubselectFetchEnabled(boolean subselectFetchEnabled)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

batchSizeback to summary
private int batchSize
effectiveEntityGraphback to summary
private final EffectiveEntityGraph effectiveEntityGraph
enabledCascadingFetchProfileback to summary
private CascadingFetchProfile enabledCascadingFetchProfile
enabledFetchProfileNamesback to summary
private HashSet<String> enabledFetchProfileNames
enabledFiltersback to summary
private HashMap<String, Filter> enabledFilters
readOnlyback to summary
private Boolean readOnly
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

subselectFetchEnabledback to summary
private boolean subselectFetchEnabled

Constructor Detail

LoadQueryInfluencersback to summary
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

LoadQueryInfluencersback to summary
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, SessionCreationOptions options)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

adjustFetchProfilesback to summary
public @Nullable HashSet<String> adjustFetchProfiles(@Nullable Set<String> disabledFetchProfiles, @Nullable Set<String> enabledFetchProfiles)
Annotations
@Internal
applyEntityGraphback to summary
public EffectiveEntityGraph applyEntityGraph(@Nullable RootGraphImplementor<?> rootGraph, @Nullable GraphSemantic graphSemantic)
checkFetchProfileNameback to summary
private void checkFetchProfileName(String name)
disableFetchProfileback to summary
public void disableFetchProfile(String name) throws UnknownProfileException
disableFilterback to summary
public void disableFilter(String filterName)
effectiveBatchSizeback to summary
public int effectiveBatchSize(CollectionPersister persister)
effectiveBatchSizeback to summary
public int effectiveBatchSize(EntityPersister persister)
effectivelyBatchLoadableback to summary
public boolean effectivelyBatchLoadable(CollectionPersister persister)
effectivelyBatchLoadableback to summary
public boolean effectivelyBatchLoadable(EntityPersister persister)
effectiveSubselectFetchEnabledback to summary
public boolean effectiveSubselectFetchEnabled(CollectionPersister persister)
enableFetchProfileback to summary
public void enableFetchProfile(String name) throws UnknownProfileException
enableFilterback to summary
public Filter enableFilter(String filterName)
fromInternalFetchProfileback to summary
public <T> T fromInternalFetchProfile(CascadingFetchProfile profile, Supplier<T> supplier)
getBatchSizeback to summary
public int getBatchSize()
getEffectiveEntityGraphback to summary
public EffectiveEntityGraph getEffectiveEntityGraph()
getEnabledCascadingFetchProfileback to summary
public CascadingFetchProfile getEnabledCascadingFetchProfile()

Fetch-profile to apply, if one, when building the result-graph for cascade fetching - for example, the result-graph used when handling a merge to immediately load additional based on jakarta.persistence.CascadeType#MERGE

getEnabledFetchProfileNamesback to summary
public Set<String> getEnabledFetchProfileNames()
getEnabledFilterback to summary
public @Nullable Filter getEnabledFilter(String filterName)
getEnabledFilterNamesback to summary
public Set<String> getEnabledFilterNames()

Returns an unmodifiable Set of enabled filter names.

Returns:Set<String>

an unmodifiable Set of enabled filter names.

getEnabledFiltersback to summary
public Map<String, Filter> getEnabledFilters()
getFilterParameterValueback to summary
public Object getFilterParameterValue(String filterParameterName)
getInternalFetchProfileback to summary
public String getInternalFetchProfile()

Deprecated

since 6.0.

Use getEnabledCascadingFetchProfile instead

Annotations
@Deprecated
since:6.0
getReadOnlyback to summary
public Boolean getReadOnly()
getSessionFactoryback to summary
public SessionFactoryImplementor getSessionFactory()

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

getSubselectFetchEnabledback to summary
public boolean getSubselectFetchEnabled()
hasEnabledCascadingFetchProfileback to summary
public boolean hasEnabledCascadingFetchProfile()
hasEnabledFetchProfilesback to summary
public boolean hasEnabledFetchProfiles()
hasEnabledFiltersback to summary
public boolean hasEnabledFilters()
hasSubselectLoadableCollectionsback to summary
public boolean hasSubselectLoadableCollections(EntityPersister persister)
hasSubselectLoadableCollectionsEnabledInProfileback to summary
private boolean hasSubselectLoadableCollectionsEnabledInProfile(EntityPersister persister)
isFetchProfileEnabledback to summary
public boolean isFetchProfileEnabled(String name) throws UnknownProfileException
isSubselectFetchEnabledInProfileback to summary
private boolean isSubselectFetchEnabledInProfile(CollectionPersister persister)
parseFilterParameterNameback to summary
public static String[] parseFilterParameterName(String filterParameterName)
setBatchSizeback to summary
public void setBatchSize(int batchSize)
setEnabledCascadingFetchProfileback to summary
public void setEnabledCascadingFetchProfile(CascadingFetchProfile enabledCascadingFetchProfile)

Set the effective cascading fetch-profile

setEnabledFetchProfileNamesback to summary
public void setEnabledFetchProfileNames(HashSet<String> enabledFetchProfileNames)
Annotations
@Internal
setInternalFetchProfileback to summary
public void setInternalFetchProfile(String internalFetchProfile)

Deprecated

since 6.0.

Use setEnabledCascadingFetchProfile instead

Annotations
@Deprecated
since:6.0
setReadOnlyback to summary
public void setReadOnly(Boolean readOnly)
setSubselectFetchEnabledback to summary
public void setSubselectFetchEnabled(boolean subselectFetchEnabled)