Package org.hibernate.engine.spi
Class LoadQueryInfluencers
- java.lang.Object
-
- org.hibernate.engine.spi.LoadQueryInfluencers
-
- All Implemented Interfaces:
Serializable
public class LoadQueryInfluencers extends Object implements 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static LoadQueryInfluencers
NONE
Static reference useful for cases where we are creating load SQL outside the context of any influencers.
-
Constructor Summary
Constructors Constructor Description LoadQueryInfluencers()
LoadQueryInfluencers(SessionFactoryImplementor sessionFactory)
LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, Boolean readOnly)
-
Method Summary
-
-
-
Field Detail
-
NONE
public static final LoadQueryInfluencers NONE
Static reference useful for cases where we are creating load SQL outside the context of any influencers. One such example is anything created by the session factory.
-
-
Constructor Detail
-
LoadQueryInfluencers
public LoadQueryInfluencers()
-
LoadQueryInfluencers
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory)
-
LoadQueryInfluencers
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, Boolean readOnly)
-
-
Method Detail
-
getSessionFactory
public SessionFactoryImplementor getSessionFactory()
-
fromInternalFetchProfile
public <T> T fromInternalFetchProfile(CascadingFetchProfile profile, Supplier<T> supplier)
-
getEnabledCascadingFetchProfile
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 CascadeType.MERGE
-
setEnabledCascadingFetchProfile
public void setEnabledCascadingFetchProfile(CascadingFetchProfile enabledCascadingFetchProfile)
Set the effective cascading fetch-profile
-
getInternalFetchProfile
@Deprecated(since="6.0") public String getInternalFetchProfile()
Deprecated.UsegetEnabledCascadingFetchProfile()
instead
-
setInternalFetchProfile
@Deprecated(since="6.0") public void setInternalFetchProfile(String internalFetchProfile)
Deprecated.
-
hasEnabledFilters
public boolean hasEnabledFilters()
-
getEnabledFilterNames
public Set<String> getEnabledFilterNames()
Returns an unmodifiable Set of enabled filter names.- Returns:
- an unmodifiable Set of enabled filter names.
-
disableFilter
public void disableFilter(String filterName)
-
parseFilterParameterName
public static String[] parseFilterParameterName(String filterParameterName)
-
hasEnabledFetchProfiles
public boolean hasEnabledFetchProfiles()
-
isFetchProfileEnabled
public boolean isFetchProfileEnabled(String name) throws UnknownProfileException
- Throws:
UnknownProfileException
-
enableFetchProfile
public void enableFetchProfile(String name) throws UnknownProfileException
- Throws:
UnknownProfileException
-
disableFetchProfile
public void disableFetchProfile(String name) throws UnknownProfileException
- Throws:
UnknownProfileException
-
getEffectiveEntityGraph
public EffectiveEntityGraph getEffectiveEntityGraph()
-
getReadOnly
public Boolean getReadOnly()
-
setReadOnly
public void setReadOnly(Boolean readOnly)
-
-