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, javax.persistence.EntityGraph, org.hibernate.Filter, .UnknownProfileException, org.hibernate.graph.GraphSemantic, org.hibernate.graph.spi.RootGraphImplementor, org.hibernate.internal.FilterImpl, org.hibernate.type.Type

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 final EffectiveEntityGraph
private HashSet<String>
private HashMap<String, Filter>
private String
public static final LoadQueryInfluencers
NONE

Static reference useful for cases where we are creating load SQL outside the context of any influencers.

private Boolean
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Constructor Summary

AccessConstructor and Description
public
public
LoadQueryInfluencers(SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public
LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, Boolean readOnly)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
private void
public void
public void
disableFilter(String filterName)

public void
public Filter
enableFilter(String filterName)

public EffectiveEntityGraph
public Set<String>
public 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 EntityGraph<T>
getFetchGraph()

Deprecated (since 5.4) getFetchGraph, getLoadGraph, setFetchGraph and setLoadGraph (as well as JPA itself honestly) all make it very unclear that there can be only one graph applied at any one time and that graph is *either* a load or a fetch graph.
public Type
getFilterParameterType(String filterParameterName)

public Object
getFilterParameterValue(String filterParameterName)

public String
public EntityGraph<T>
getLoadGraph()

Deprecated (since 5.4) getFetchGraph, getLoadGraph, setFetchGraph and setLoadGraph (as well as JPA itself honestly) all make it very unclear that there can be only one graph applied at any one time and that graph is *either* a load or a fetch graph.
public Boolean
public SessionFactoryImplementor
getSessionFactory()

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

public void
setFetchGraph(EntityGraph<T> fetchGraph)

Deprecated (since 5.4) getFetchGraph, getLoadGraph, setFetchGraph and setLoadGraph (as well as JPA itself honestly) all make it very unclear that there can be only one graph applied at any one time and that graph is *either* a load or a fetch graph.
public void
setInternalFetchProfile(String internalFetchProfile)

public void
setLoadGraph(final EntityGraph<T> loadGraph)

Deprecated (since 5.4) getFetchGraph, getLoadGraph, setFetchGraph and setLoadGraph (as well as JPA itself honestly) all make it very unclear that there can be only one graph applied at any one time and that that graph is *either* a load or a fetch graph.
public void
setReadOnly(Boolean readOnly)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

effectiveEntityGraphback to summary
private final EffectiveEntityGraph effectiveEntityGraph
enabledFetchProfileNamesback to summary
private HashSet<String> enabledFetchProfileNames
enabledFiltersback to summary
private HashMap<String, Filter> enabledFilters
internalFetchProfileback to summary
private String internalFetchProfile
NONEback to summary
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.

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.

Constructor Detail

LoadQueryInfluencersback to summary
public LoadQueryInfluencers()
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, Boolean readOnly)

Deprecated

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

Method Detail

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)
enableFetchProfileback to summary
public void enableFetchProfile(String name) throws UnknownProfileException
enableFilterback to summary
public Filter enableFilter(String filterName)
getEffectiveEntityGraphback to summary
public EffectiveEntityGraph getEffectiveEntityGraph()
getEnabledFetchProfileNamesback to summary
public Set<String> getEnabledFetchProfileNames()
getEnabledFilterback to summary
public 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()
getFetchGraphback to summary
public EntityGraph<T> getFetchGraph()

Deprecated

(since 5.4) getFetchGraph, getLoadGraph, setFetchGraph and setLoadGraph (as well as JPA itself honestly) all make it very unclear that there can be only one graph applied at any one time and that graph is *either* a load or a fetch graph. These have all been replaced with getEffectiveEntityGraph().

Annotations
@Deprecated
See Also
EffectiveEntityGraph
getFilterParameterTypeback to summary
public Type getFilterParameterType(String filterParameterName)
getFilterParameterValueback to summary
public Object getFilterParameterValue(String filterParameterName)
getInternalFetchProfileback to summary
public String getInternalFetchProfile()
getLoadGraphback to summary
public EntityGraph<T> getLoadGraph()

Deprecated

(since 5.4) getFetchGraph, getLoadGraph, setFetchGraph and setLoadGraph (as well as JPA itself honestly) all make it very unclear that there can be only one graph applied at any one time and that graph is *either* a load or a fetch graph. These have all been replaced with getEffectiveEntityGraph().

Annotations
@Deprecated
See Also
EffectiveEntityGraph
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.

hasEnabledFetchProfilesback to summary
public boolean hasEnabledFetchProfiles()
hasEnabledFiltersback to summary
public boolean hasEnabledFilters()
isFetchProfileEnabledback to summary
public boolean isFetchProfileEnabled(String name) throws UnknownProfileException
parseFilterParameterNameback to summary
public static String[] parseFilterParameterName(String filterParameterName)
setFetchGraphback to summary
public void setFetchGraph(EntityGraph<T> fetchGraph)

Deprecated

(since 5.4) getFetchGraph, getLoadGraph, setFetchGraph and setLoadGraph (as well as JPA itself honestly) all make it very unclear that there can be only one graph applied at any one time and that graph is *either* a load or a fetch graph. These have all been replaced with getEffectiveEntityGraph().

Annotations
@Deprecated
See Also
EffectiveEntityGraph
setInternalFetchProfileback to summary
public void setInternalFetchProfile(String internalFetchProfile)
setLoadGraphback to summary
public void setLoadGraph(final EntityGraph<T> loadGraph)

Deprecated

(since 5.4) getFetchGraph, getLoadGraph, setFetchGraph and setLoadGraph (as well as JPA itself honestly) all make it very unclear that there can be only one graph applied at any one time and that that graph is *either* a load or a fetch graph. These have all been replaced with getEffectiveEntityGraph().

Annotations
@Deprecated
See Also
EffectiveEntityGraph
setReadOnlyback to summary
public void setReadOnly(Boolean readOnly)