类 LoadQueryInfluencers
- java.lang.Object
-
- org.hibernate.engine.spi.LoadQueryInfluencers
-
- 所有已实现的接口:
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)
- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static LoadQueryInfluencersNONEStatic reference useful for cases where we are creating load SQL outside the context of any influencers.
-
构造器概要
构造器 构造器 说明 LoadQueryInfluencers()LoadQueryInfluencers(SessionFactoryImplementor sessionFactory)LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, Boolean readOnly)
-
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voiddisableFetchProfile(String name)voiddisableFilter(String filterName)voidenableFetchProfile(String name)FilterenableFilter(String filterName)EffectiveEntityGraphgetEffectiveEntityGraph()Set<String>getEnabledFetchProfileNames()FiltergetEnabledFilter(String filterName)Set<String>getEnabledFilterNames()Returns an unmodifiable Set of enabled filter names.Map<String,Filter>getEnabledFilters()javax.persistence.EntityGraphgetFetchGraph()已过时。(since 5.4)getFetchGraph(),getLoadGraph(),setFetchGraph(javax.persistence.EntityGraph)andsetLoadGraph(javax.persistence.EntityGraph)(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.TypegetFilterParameterType(String filterParameterName)ObjectgetFilterParameterValue(String filterParameterName)StringgetInternalFetchProfile()javax.persistence.EntityGraphgetLoadGraph()已过时。(since 5.4)getFetchGraph(),getLoadGraph(),setFetchGraph(javax.persistence.EntityGraph)andsetLoadGraph(javax.persistence.EntityGraph)(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.BooleangetReadOnly()SessionFactoryImplementorgetSessionFactory()booleanhasEnabledFetchProfiles()booleanhasEnabledFilters()booleanisFetchProfileEnabled(String name)static String[]parseFilterParameterName(String filterParameterName)voidsetFetchGraph(javax.persistence.EntityGraph fetchGraph)已过时。(since 5.4)getFetchGraph(),getLoadGraph(),setFetchGraph(javax.persistence.EntityGraph)andsetLoadGraph(javax.persistence.EntityGraph)(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.voidsetInternalFetchProfile(String internalFetchProfile)voidsetLoadGraph(javax.persistence.EntityGraph loadGraph)已过时。(since 5.4)getFetchGraph(),getLoadGraph(),setFetchGraph(javax.persistence.EntityGraph)andsetLoadGraph(javax.persistence.EntityGraph)(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.voidsetReadOnly(Boolean readOnly)
-
-
-
字段详细资料
-
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.
-
-
构造器详细资料
-
LoadQueryInfluencers
public LoadQueryInfluencers()
-
LoadQueryInfluencers
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory)
-
LoadQueryInfluencers
public LoadQueryInfluencers(SessionFactoryImplementor sessionFactory, Boolean readOnly)
-
-
方法详细资料
-
getSessionFactory
public SessionFactoryImplementor getSessionFactory()
-
getInternalFetchProfile
public String getInternalFetchProfile()
-
setInternalFetchProfile
public void setInternalFetchProfile(String internalFetchProfile)
-
hasEnabledFilters
public boolean hasEnabledFilters()
-
getEnabledFilterNames
public Set<String> getEnabledFilterNames()
Returns an unmodifiable Set of enabled filter names.- 返回:
- 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
-
enableFetchProfile
public void enableFetchProfile(String name) throws UnknownProfileException
-
disableFetchProfile
public void disableFetchProfile(String name) throws UnknownProfileException
-
getEffectiveEntityGraph
public EffectiveEntityGraph getEffectiveEntityGraph()
-
getFetchGraph
@Deprecated public javax.persistence.EntityGraph getFetchGraph()
已过时。(since 5.4)getFetchGraph(),getLoadGraph(),setFetchGraph(javax.persistence.EntityGraph)andsetLoadGraph(javax.persistence.EntityGraph)(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 withgetEffectiveEntityGraph().- 另请参阅:
EffectiveEntityGraph
-
setFetchGraph
@Deprecated public void setFetchGraph(javax.persistence.EntityGraph fetchGraph)
已过时。(since 5.4)getFetchGraph(),getLoadGraph(),setFetchGraph(javax.persistence.EntityGraph)andsetLoadGraph(javax.persistence.EntityGraph)(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 withgetEffectiveEntityGraph().- 另请参阅:
EffectiveEntityGraph
-
getLoadGraph
@Deprecated public javax.persistence.EntityGraph getLoadGraph()
已过时。(since 5.4)getFetchGraph(),getLoadGraph(),setFetchGraph(javax.persistence.EntityGraph)andsetLoadGraph(javax.persistence.EntityGraph)(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 withgetEffectiveEntityGraph().- 另请参阅:
EffectiveEntityGraph
-
setLoadGraph
@Deprecated public void setLoadGraph(javax.persistence.EntityGraph loadGraph)
已过时。(since 5.4)getFetchGraph(),getLoadGraph(),setFetchGraph(javax.persistence.EntityGraph)andsetLoadGraph(javax.persistence.EntityGraph)(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 withgetEffectiveEntityGraph().- 另请参阅:
EffectiveEntityGraph
-
getReadOnly
public Boolean getReadOnly()
-
setReadOnly
public void setReadOnly(Boolean readOnly)
-
-