类 NamedQueryDefinition
- java.lang.Object
-
- org.hibernate.engine.spi.NamedQueryDefinition
-
- 所有已实现的接口:
Serializable
- 直接已知子类:
NamedSQLQueryDefinition
public class NamedQueryDefinition extends Object implements Serializable
Definition of a named query, defined in the mapping metadata. Additionally, as of JPA 2.1, named query definition can also come from a compiled query.- 作者:
- Gavin King, Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 NamedQueryDefinition(String name, String query, boolean cacheable, String cacheRegion, Integer timeout, Integer lockTimeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map parameterTypes)已过时。UseNamedQueryDefinitionBuilderinstead.NamedQueryDefinition(String name, String query, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map parameterTypes)已过时。UseNamedQueryDefinitionBuilderinstead.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 CacheModegetCacheMode()StringgetCacheRegion()StringgetComment()IntegergetFetchSize()IntegergetFirstResult()FlushModegetFlushMode()LockOptionsgetLockOptions()IntegergetMaxResults()StringgetName()MapgetParameterTypes()BooleangetPassDistinctThrough()StringgetQuery()StringgetQueryString()IntegergetTimeout()booleanisCacheable()booleanisReadOnly()NamedQueryDefinitionmakeCopy(String name)StringtoString()
-
-
-
构造器详细资料
-
NamedQueryDefinition
@Deprecated public NamedQueryDefinition(String name, String query, boolean cacheable, String cacheRegion, Integer timeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map parameterTypes)
已过时。UseNamedQueryDefinitionBuilderinstead.This form is used to bind named queries from Hibernate metadata, bothhbm.xmlfiles andNamedQueryannotation.- 参数:
name- The name under which to key/register the queryquery- The query string.cacheable- Is the query cacheable?cacheRegion- If cacheable, was there a specific region named?timeout- Query timeout,nullindicates no timeoutfetchSize- Fetch size associated with the query,nullindicates no limitflushMode- Flush mode associated with querycacheMode- Cache mode associated with queryreadOnly- Should entities returned from this query (those not already associated with the Session anyway) be loaded as read-only?comment- SQL comment to be used in the generated SQL,nullindicates noneparameterTypes- (no idea, afaict this is always passed as null)
-
NamedQueryDefinition
@Deprecated public NamedQueryDefinition(String name, String query, boolean cacheable, String cacheRegion, Integer timeout, Integer lockTimeout, Integer fetchSize, FlushMode flushMode, CacheMode cacheMode, boolean readOnly, String comment, Map parameterTypes)
已过时。UseNamedQueryDefinitionBuilderinstead.This version is used to bind named queries defined viaNamedQuery.- 参数:
name- The name under which to key/register the queryquery- The query string.cacheable- Is the query cacheable?cacheRegion- If cacheable, was there a specific region named?timeout- Query timeout,nullindicates no timeoutlockTimeout- Specifies the lock timeout for queries that apply lock modes.fetchSize- Fetch size associated with the query,nullindicates no limitflushMode- Flush mode associated with querycacheMode- Cache mode associated with queryreadOnly- Should entities returned from this query (those not already associated with the Session anyway) be loaded as read-only?comment- SQL comment to be used in the generated SQL,nullindicates noneparameterTypes- (no idea, afaict this is always passed as null)
-
-
方法详细资料
-
getName
public String getName()
-
getQueryString
public String getQueryString()
-
isCacheable
public boolean isCacheable()
-
getCacheRegion
public String getCacheRegion()
-
getFetchSize
public Integer getFetchSize()
-
getTimeout
public Integer getTimeout()
-
getFlushMode
public FlushMode getFlushMode()
-
getParameterTypes
public Map getParameterTypes()
-
getQuery
public String getQuery()
-
getCacheMode
public CacheMode getCacheMode()
-
isReadOnly
public boolean isReadOnly()
-
getComment
public String getComment()
-
getLockOptions
public LockOptions getLockOptions()
-
getFirstResult
public Integer getFirstResult()
-
getMaxResults
public Integer getMaxResults()
-
getPassDistinctThrough
public Boolean getPassDistinctThrough()
-
makeCopy
public NamedQueryDefinition makeCopy(String name)
-
-