CommonQueryContract instead.@Deprecated public interface BasicQueryContract<T extends BasicQueryContract>
| Modifier and Type | Method and Description | 
|---|---|
CacheMode | 
getCacheMode()
Deprecated.  
Obtain the CacheMode in effect for this query. 
 | 
String | 
getCacheRegion()
Deprecated.  
Obtain the name of the second level query cache region in which query results will be stored (if they are
 cached, see the discussion on  
isCacheable() for more information). | 
Integer | 
getFetchSize()
Deprecated.  
Obtain the JDBC fetch size hint in effect for this query. 
 | 
FlushMode | 
getHibernateFlushMode()
Deprecated.  
Obtain the FlushMode in effect for this query. 
 | 
Type[] | 
getReturnTypes()
Deprecated. 
 
(since 5.2) with no replacement; to be removed in 6.0 
 | 
Integer | 
getTimeout()
Deprecated.  
Obtain the query timeout in seconds. 
 | 
boolean | 
isCacheable()
Deprecated.  
Are the results of this query eligible for second level query caching?  This is different that second level
 caching of any returned entities and collections. 
 | 
boolean | 
isReadOnly()
Deprecated.  
Should entities and proxies loaded by this Query be put in read-only mode? If the
 read-only/modifiable setting was not initialized, then the default
 read-only/modifiable setting for the persistence context is returned instead. 
 | 
T | 
setCacheable(boolean cacheable)
Deprecated.  
Enable/disable second level query (result) caching for this query. 
 | 
T | 
setCacheMode(CacheMode cacheMode)
Deprecated.  
(Re)set the current CacheMode in effect for this query. 
 | 
T | 
setCacheRegion(String cacheRegion)
Deprecated.  
Set the name of the cache region where query results should be cached (if cached at all). 
 | 
T | 
setFetchSize(int fetchSize)
Deprecated.  
Sets a JDBC fetch size hint for the query. 
 | 
default BasicQueryContract | 
setFlushMode(FlushMode flushMode)
Deprecated. 
 
(since 5.2) use  
setHibernateFlushMode(org.hibernate.FlushMode) instead | 
T | 
setHibernateFlushMode(FlushMode flushMode)
Deprecated.  
(Re)set the current FlushMode in effect for this query. 
 | 
T | 
setReadOnly(boolean readOnly)
Deprecated.  
Set the read-only/modifiable mode for entities and proxies
 loaded by this Query. 
 | 
T | 
setTimeout(int timeout)
Deprecated.  
Set the query timeout in seconds. 
 | 
@Deprecated default BasicQueryContract setFlushMode(FlushMode flushMode)
setHibernateFlushMode(org.hibernate.FlushMode) insteadflushMode - The new FlushMode to use.this, for method chaininggetHibernateFlushMode()FlushMode getHibernateFlushMode()
Session.getFlushMode(), 
FlushModeT setHibernateFlushMode(FlushMode flushMode)
flushMode - The new FlushMode to use.this, for method chaininggetHibernateFlushMode()CacheMode getCacheMode()
Session.getCacheMode(), 
CacheModeT setCacheMode(CacheMode cacheMode)
cacheMode - The new CacheMode to use.this, for method chaininggetCacheMode()boolean isCacheable()
SessionFactory for this to happen.  Usually that is
 controlled by the hibernate.cache.use_query_cache configuration setting.true if the query results are eligible for caching, false otherwise.AvailableSettings.USE_QUERY_CACHET setCacheable(boolean cacheable)
cacheable - Should the query results be cacheable?this, for method chainingisCacheable()String getCacheRegion()
isCacheable() for more information).  null indicates that the
 default region should be used.null indicates
 the default region.T setCacheRegion(String cacheRegion)
cacheRegion - the name of a query cache region, or null to indicate that the default region
 should be used.this, for method chaininggetCacheRegion()Integer getTimeout()
Statement.setQueryTimeout(int).  Zero indicates no timeout.Statement.getQueryTimeout(), 
Statement.setQueryTimeout(int)T setTimeout(int timeout)
timeout - the timeout in secondsthis, for method chaininggetTimeout()Integer getFetchSize()
Statement.setFetchSize(int).  As defined b y JDBC, this value is a hint to the
 driver to indicate how many rows to fetch from the database when more rows are needed.
 NOTE : JDBC expressly defines this value as a hint.  It may or may not have any effect on the actual
 query execution and ResultSet processing depending on the driver.Statement.getFetchSize(), 
Statement.setFetchSize(int)T setFetchSize(int fetchSize)
fetchSize - the fetch size hintthis, for method chaininggetFetchSize()boolean isReadOnly()
true if the entities and proxies loaded by the query will be put
 in read-only mode; false otherwise (they will be modifiable)setReadOnly(boolean), 
The read-only/modifiable setting has no impact on entities/proxies returned by the
 query that existed in the session before the query was executed.T setReadOnly(boolean readOnly)
readOnly - true indicates that entities and proxies loaded by the query
 are to be put in read-only mode; false indicates that entities and proxies
 loaded by the query will be put in modifiable modethis, for method chainingTo set the default read-only/modifiable setting used for
 entities and proxies that are loaded into the session:, 
PersistenceContext.setDefaultReadOnly(boolean), 
Read-only entities are not dirty-checked and snapshots of persistent
 state are not maintained. Read-only entities can be modified, but
 changes are not persisted.
 When a proxy is initialized, the loaded entity will have the same
 read-only/modifiable setting as the uninitialized
 proxy has, regardless of the session's current setting.
 The read-only/modifiable setting has no impact on entities/proxies
 returned by the query that existed in the session before the query was executed.@Deprecated Type[] getReturnTypes()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.