Package org.hibernate.engine.spi
Class LoadQueryInfluencers
java.lang.Object
org.hibernate.engine.spi.LoadQueryInfluencers
- All Implemented Interfaces:
Serializable
Centralize all options which can influence the SQL query needed to load an
entity. Currently, such influencers are defined as:
- filters
- fetch profiles
- internal fetch profile (merge profile, etc)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLoadQueryInfluencers(SessionFactoryImplementor sessionFactory) LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, SessionCreationOptions options) -
Method Summary
Modifier and TypeMethodDescriptionadjustFetchProfiles(@Nullable Set<String> disabledFetchProfiles, @Nullable Set<String> enabledFetchProfiles) applyEntityGraph(@Nullable RootGraphImplementor<?> rootGraph, @Nullable GraphSemantic graphSemantic) voiddisableFetchProfile(String name) voiddisableFilter(String filterName) inteffectiveBatchSize(CollectionPersister persister) inteffectiveBatchSize(EntityPersister persister) booleaneffectivelyBatchLoadable(CollectionPersister persister) booleaneffectivelyBatchLoadable(EntityPersister persister) booleanvoidenableFetchProfile(String name) enableFilter(String filterName) <T> TfromInternalFetchProfile(CascadingFetchProfile profile, Supplier<T> supplier) intFetch-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 CascadeType.MERGE@Nullable FiltergetEnabledFilter(String filterName) Returns an unmodifiable Set of enabled filter names.getFilterParameterValue(String filterParameterName) booleanbooleanbooleanbooleanbooleanhasSubselectLoadableCollections(EntityPersister persister) booleanisFetchProfileEnabled(String name) static String[]parseFilterParameterName(String filterParameterName) voidsetBatchSize(int batchSize) voidsetEnabledCascadingFetchProfile(CascadingFetchProfile enabledCascadingFetchProfile) Set the effective cascading fetch-profilevoidsetEnabledFetchProfileNames(HashSet<String> enabledFetchProfileNames) voidsetReadOnly(Boolean readOnly) voidsetSubselectFetchEnabled(boolean subselectFetchEnabled)
-
Constructor Details
-
LoadQueryInfluencers
-
LoadQueryInfluencers
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, SessionCreationOptions options)
-
-
Method Details
-
applyEntityGraph
public EffectiveEntityGraph applyEntityGraph(@Nullable RootGraphImplementor<?> rootGraph, @Nullable GraphSemantic graphSemantic) -
getSessionFactory
-
fromInternalFetchProfile
-
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 CascadeType.MERGE -
hasEnabledCascadingFetchProfile
public boolean hasEnabledCascadingFetchProfile() -
setEnabledCascadingFetchProfile
Set the effective cascading fetch-profile -
hasEnabledFilters
public boolean hasEnabledFilters() -
getEnabledFilters
-
getEnabledFilterNames
Returns an unmodifiable Set of enabled filter names.- Returns:
- an unmodifiable Set of enabled filter names.
-
getEnabledFilter
-
enableFilter
-
disableFilter
-
getFilterParameterValue
-
parseFilterParameterName
-
hasEnabledFetchProfiles
public boolean hasEnabledFetchProfiles() -
getEnabledFetchProfileNames
-
isFetchProfileEnabled
- Throws:
UnknownProfileException
-
enableFetchProfile
- Throws:
UnknownProfileException
-
disableFetchProfile
- Throws:
UnknownProfileException
-
adjustFetchProfiles
-
setEnabledFetchProfileNames
-
getEffectiveEntityGraph
-
getReadOnly
-
setReadOnly
-
getBatchSize
public int getBatchSize() -
setBatchSize
public void setBatchSize(int batchSize) -
effectiveBatchSize
-
effectivelyBatchLoadable
-
effectiveBatchSize
-
effectivelyBatchLoadable
-
getSubselectFetchEnabled
public boolean getSubselectFetchEnabled() -
setSubselectFetchEnabled
public void setSubselectFetchEnabled(boolean subselectFetchEnabled) -
effectiveSubselectFetchEnabled
-
hasSubselectLoadableCollections
-