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
ConstructorDescriptionLoadQueryInfluencers
(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) void
disableFetchProfile
(String name) void
disableFilter
(String filterName) int
effectiveBatchSize
(CollectionPersister persister) int
effectiveBatchSize
(EntityPersister persister) boolean
effectivelyBatchLoadable
(CollectionPersister persister) boolean
effectivelyBatchLoadable
(EntityPersister persister) boolean
void
enableFetchProfile
(String name) enableFilter
(String filterName) <T> T
fromInternalFetchProfile
(CascadingFetchProfile profile, Supplier<T> supplier) int
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@Nullable Filter
getEnabledFilter
(String filterName) Returns an unmodifiable Set of enabled filter names.getFilterParameterValue
(String filterParameterName) Deprecated.boolean
boolean
boolean
boolean
boolean
hasSubselectLoadableCollections
(EntityPersister persister) boolean
isFetchProfileEnabled
(String name) static String[]
parseFilterParameterName
(String filterParameterName) void
setBatchSize
(int batchSize) void
setEnabledCascadingFetchProfile
(CascadingFetchProfile enabledCascadingFetchProfile) Set the effective cascading fetch-profilevoid
setEnabledFetchProfileNames
(HashSet<String> enabledFetchProfileNames) void
setInternalFetchProfile
(String internalFetchProfile) Deprecated.void
setReadOnly
(Boolean readOnly) void
setSubselectFetchEnabled
(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 -
getInternalFetchProfile
Deprecated.UsegetEnabledCascadingFetchProfile()
instead -
setInternalFetchProfile
Deprecated. -
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
-
getEnabledCascadingFetchProfile()
instead