Package org.hibernate.query.internal
Class QueryOptionsImpl
java.lang.Object
org.hibernate.query.internal.QueryOptionsImpl
- All Implemented Interfaces:
AppliedGraph
,MutableQueryOptions
,QueryOptions
-
Field Summary
Fields inherited from interface org.hibernate.query.spi.QueryOptions
NONE, READ_ONLY, READ_WRITE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDatabaseHint
(String hint) Corollary toQueryOptions.getDatabaseHints()
void
applyGraph
(RootGraphImplementor<?> rootGraph, GraphSemantic graphSemantic) void
disableFetchProfile
(String profileName) void
enableFetchProfile
(String profileName) JPAEntityGraph
explicitly applied to the query.Controls whether query results are read from the cache.Controls whether query results are put into the cache.The SQL comment to apply to the interpreted SQL query, for dialects which support SQL commentsHints to apply to the interpreted SQL queryThe explicitly disabled profiles for this queryThe explicitly enabled profiles for this queryThe fetch size to be applied to the JDBC query.The flush mode to use for the query execution@Nullable RootGraphImplementor<?>
getGraph()
The applied graphgetLimit()
The limit to the query results.Describes the locking to apply to the query resultsShould the query plan of the query be cached?The query cache region in which the results should be cached.Transformer applied to the query to transform the structure of the overall results@Nullable GraphSemantic
The semantic (fetch/load) under which the graph should be appliedThe timeout to apply to the query.Transformer applied to the query to transform the structure of each "row" in the resultsShould entities returned from the query be marked read-only.Should results from the query be cached?void
setCacheRetrieveMode
(CacheRetrieveMode retrieveMode) Corollary toQueryOptions.getCacheRetrieveMode()
void
setCacheStoreMode
(CacheStoreMode storeMode) Corollary toQueryOptions.getCacheStoreMode()
void
setComment
(String comment) Corollary toQueryOptions.getComment()
void
setFetchSize
(int fetchSize) Corollary toQueryOptions.getFetchSize()
void
setFetchSize
(Integer fetchSize) void
setFlushMode
(FlushMode flushMode) Corollary toQueryOptions.getFlushMode()
void
setQueryPlanCachingEnabled
(Boolean queryPlanCachingEnabled) Corollary toQueryOptions.getQueryPlanCachingEnabled()
void
setReadOnly
(boolean readOnly) Corollary toQueryOptions.isReadOnly()
void
setResultCacheRegionName
(String resultCacheRegionName) Corollary toQueryOptions.getResultCacheRegionName()
void
setResultCachingEnabled
(boolean resultCachingEnabled) Corollary toQueryOptions.isResultCachingEnabled()
void
setResultListTransformer
(ResultListTransformer<?> transformer) void
setTimeout
(int timeout) Corollary toQueryOptions.getTimeout()
void
setTimeout
(Integer timeout) void
setTupleTransformer
(TupleTransformer<?> transformer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.query.spi.MutableQueryOptions
setCacheMode
Methods inherited from interface org.hibernate.query.spi.QueryOptions
getCacheMode, getEffectiveLimit, getFirstRow, getMaxRows, getUniqueSemantic, hasLimit
-
Constructor Details
-
QueryOptionsImpl
public QueryOptionsImpl()
-
-
Method Details
-
getTimeout
Description copied from interface:QueryOptions
The timeout to apply to the query. May also be defined at the transaction level usingTransaction.getTimeout()
- Specified by:
getTimeout
in interfaceQueryOptions
-
setTimeout
-
getFlushMode
Description copied from interface:QueryOptions
The flush mode to use for the query execution- Specified by:
getFlushMode
in interfaceQueryOptions
-
setFlushMode
Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getFlushMode()
- Specified by:
setFlushMode
in interfaceMutableQueryOptions
-
getComment
Description copied from interface:QueryOptions
The SQL comment to apply to the interpreted SQL query, for dialects which support SQL comments- Specified by:
getComment
in interfaceQueryOptions
-
setComment
Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getComment()
- Specified by:
setComment
in interfaceMutableQueryOptions
-
getDatabaseHints
Description copied from interface:QueryOptions
Hints to apply to the interpreted SQL query- Specified by:
getDatabaseHints
in interfaceQueryOptions
-
addDatabaseHint
Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getDatabaseHints()
- Specified by:
addDatabaseHint
in interfaceMutableQueryOptions
-
setTupleTransformer
- Specified by:
setTupleTransformer
in interfaceMutableQueryOptions
-
setResultListTransformer
- Specified by:
setResultListTransformer
in interfaceMutableQueryOptions
-
getLimit
Description copied from interface:QueryOptions
The limit to the query results. May also be accessed viaQueryOptions.getFirstRow()
andQueryOptions.getMaxRows()
- Specified by:
getLimit
in interfaceQueryOptions
-
getLockOptions
Description copied from interface:QueryOptions
Describes the locking to apply to the query results- Specified by:
getLockOptions
in interfaceQueryOptions
-
getFetchSize
Description copied from interface:QueryOptions
The fetch size to be applied to the JDBC query.- Specified by:
getFetchSize
in interfaceQueryOptions
- See Also:
-
setFetchSize
-
getCacheRetrieveMode
Description copied from interface:QueryOptions
Controls whether query results are read from the cache. No effect unlessQueryOptions.isResultCachingEnabled()
returnstrue
- Specified by:
getCacheRetrieveMode
in interfaceQueryOptions
- See Also:
-
getCacheStoreMode
Description copied from interface:QueryOptions
Controls whether query results are put into the cache. No effect unlessQueryOptions.isResultCachingEnabled()
returnstrue
- Specified by:
getCacheStoreMode
in interfaceQueryOptions
- See Also:
-
setCacheRetrieveMode
Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getCacheRetrieveMode()
- Specified by:
setCacheRetrieveMode
in interfaceMutableQueryOptions
-
setCacheStoreMode
Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getCacheStoreMode()
- Specified by:
setCacheStoreMode
in interfaceMutableQueryOptions
-
isResultCachingEnabled
Description copied from interface:QueryOptions
Should results from the query be cached?- Specified by:
isResultCachingEnabled
in interfaceQueryOptions
- See Also:
-
setResultCachingEnabled
public void setResultCachingEnabled(boolean resultCachingEnabled) Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.isResultCachingEnabled()
- Specified by:
setResultCachingEnabled
in interfaceMutableQueryOptions
-
getResultCacheRegionName
Description copied from interface:QueryOptions
The query cache region in which the results should be cached. No effect unlessQueryOptions.isResultCachingEnabled()
returnstrue
- Specified by:
getResultCacheRegionName
in interfaceQueryOptions
-
getQueryPlanCachingEnabled
Description copied from interface:QueryOptions
Should the query plan of the query be cached?- Specified by:
getQueryPlanCachingEnabled
in interfaceQueryOptions
-
setQueryPlanCachingEnabled
Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getQueryPlanCachingEnabled()
- Specified by:
setQueryPlanCachingEnabled
in interfaceMutableQueryOptions
-
getTupleTransformer
Description copied from interface:QueryOptions
Transformer applied to the query to transform the structure of each "row" in the results- Specified by:
getTupleTransformer
in interfaceQueryOptions
-
getResultListTransformer
Description copied from interface:QueryOptions
Transformer applied to the query to transform the structure of the overall results- Specified by:
getResultListTransformer
in interfaceQueryOptions
-
setResultCacheRegionName
Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getResultCacheRegionName()
- Specified by:
setResultCacheRegionName
in interfaceMutableQueryOptions
-
setTimeout
public void setTimeout(int timeout) Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getTimeout()
- Specified by:
setTimeout
in interfaceMutableQueryOptions
-
setFetchSize
public void setFetchSize(int fetchSize) Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.getFetchSize()
- Specified by:
setFetchSize
in interfaceMutableQueryOptions
-
setReadOnly
public void setReadOnly(boolean readOnly) Description copied from interface:MutableQueryOptions
Corollary toQueryOptions.isReadOnly()
- Specified by:
setReadOnly
in interfaceMutableQueryOptions
-
isReadOnly
Description copied from interface:QueryOptions
Should entities returned from the query be marked read-only.- Specified by:
isReadOnly
in interfaceQueryOptions
-
applyGraph
- Specified by:
applyGraph
in interfaceMutableQueryOptions
-
enableFetchProfile
- Specified by:
enableFetchProfile
in interfaceMutableQueryOptions
-
disableFetchProfile
- Specified by:
disableFetchProfile
in interfaceMutableQueryOptions
-
getEnabledFetchProfiles
Description copied from interface:QueryOptions
The explicitly enabled profiles for this query- Specified by:
getEnabledFetchProfiles
in interfaceQueryOptions
-
getDisabledFetchProfiles
Description copied from interface:QueryOptions
The explicitly disabled profiles for this query- Specified by:
getDisabledFetchProfiles
in interfaceQueryOptions
-
getAppliedGraph
Description copied from interface:QueryOptions
JPAEntityGraph
explicitly applied to the query.- Specified by:
getAppliedGraph
in interfaceQueryOptions
-
getGraph
Description copied from interface:AppliedGraph
The applied graph- Specified by:
getGraph
in interfaceAppliedGraph
-
getSemantic
Description copied from interface:AppliedGraph
The semantic (fetch/load) under which the graph should be applied- Specified by:
getSemantic
in interfaceAppliedGraph
-