Package org.hibernate.query.spi
Class DelegatingQueryOptions
- java.lang.Object
-
- org.hibernate.query.spi.DelegatingQueryOptions
-
- All Implemented Interfaces:
QueryOptions
- Direct Known Subclasses:
QuerySqmImpl.UniqueSemanticFilterQueryOption,SqlOmittingQueryOptions
public class DelegatingQueryOptions extends Object implements QueryOptions
-
-
Field Summary
-
Fields inherited from interface org.hibernate.query.spi.QueryOptions
NONE, READ_ONLY, READ_WRITE
-
-
Constructor Summary
Constructors Constructor Description DelegatingQueryOptions(QueryOptions queryOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AppliedGraphgetAppliedGraph()JPAEntityGraphexplicitly applied to the query.CacheModegetCacheMode()CacheRetrieveModegetCacheRetrieveMode()Controls whether query results are read from the cache.CacheStoreModegetCacheStoreMode()Controls whether query results are put into the cache.StringgetComment()The SQL comment to apply to the interpreted SQL query, for dialects which support SQL commentsList<String>getDatabaseHints()Hints to apply to the interpreted SQL queryLimitgetEffectiveLimit()Determine the effective paging limit to apply to the query.IntegergetFetchSize()The fetch size to be applied to the JDBC query.IntegergetFirstRow()The first row from the results to returnFlushModegetFlushMode()The flush mode to use for the query executionLimitgetLimit()The limit to the query results.LockOptionsgetLockOptions()Describes the locking to apply to the query resultsIntegergetMaxRows()The maximum number of rows to return from the resultsStringgetResultCacheRegionName()The query cache region in which the results should be cached.ResultListTransformer<?>getResultListTransformer()Transformer applied to the query to transform the structure of the overall resultsIntegergetTimeout()The timeout to apply to the query.TupleTransformer<?>getTupleTransformer()Transformer applied to the query to transform the structure of each "row" in the resultsListResultsConsumer.UniqueSemanticgetUniqueSemantic()booleanhasLimit()Did the application explicitly request paging limits?BooleanisReadOnly()Should entities returned from the query be marked read-only.BooleanisResultCachingEnabled()Should results from the query be cached?
-
-
-
Constructor Detail
-
DelegatingQueryOptions
public DelegatingQueryOptions(QueryOptions queryOptions)
-
-
Method Detail
-
getTimeout
public Integer getTimeout()
Description copied from interface:QueryOptionsThe timeout to apply to the query. May also be defined at the transaction level usingTransaction.getTimeout()- Specified by:
getTimeoutin interfaceQueryOptions
-
getFlushMode
public FlushMode getFlushMode()
Description copied from interface:QueryOptionsThe flush mode to use for the query execution- Specified by:
getFlushModein interfaceQueryOptions
-
isReadOnly
public Boolean isReadOnly()
Description copied from interface:QueryOptionsShould entities returned from the query be marked read-only.- Specified by:
isReadOnlyin interfaceQueryOptions
-
getAppliedGraph
public AppliedGraph getAppliedGraph()
Description copied from interface:QueryOptionsJPAEntityGraphexplicitly applied to the query.- Specified by:
getAppliedGraphin interfaceQueryOptions
-
getTupleTransformer
public TupleTransformer<?> getTupleTransformer()
Description copied from interface:QueryOptionsTransformer applied to the query to transform the structure of each "row" in the results- Specified by:
getTupleTransformerin interfaceQueryOptions
-
getResultListTransformer
public ResultListTransformer<?> getResultListTransformer()
Description copied from interface:QueryOptionsTransformer applied to the query to transform the structure of the overall results- Specified by:
getResultListTransformerin interfaceQueryOptions
-
isResultCachingEnabled
public Boolean isResultCachingEnabled()
Description copied from interface:QueryOptionsShould results from the query be cached?- Specified by:
isResultCachingEnabledin interfaceQueryOptions- See Also:
QueryOptions.getCacheMode(),QueryOptions.getResultCacheRegionName()
-
getCacheRetrieveMode
public CacheRetrieveMode getCacheRetrieveMode()
Description copied from interface:QueryOptionsControls whether query results are read from the cache. No effect unlessQueryOptions.isResultCachingEnabled()returnstrue- Specified by:
getCacheRetrieveModein interfaceQueryOptions- See Also:
CacheMode
-
getCacheStoreMode
public CacheStoreMode getCacheStoreMode()
Description copied from interface:QueryOptionsControls whether query results are put into the cache. No effect unlessQueryOptions.isResultCachingEnabled()returnstrue- Specified by:
getCacheStoreModein interfaceQueryOptions- See Also:
CacheMode
-
getCacheMode
public CacheMode getCacheMode()
- Specified by:
getCacheModein interfaceQueryOptions
-
getResultCacheRegionName
public String getResultCacheRegionName()
Description copied from interface:QueryOptionsThe query cache region in which the results should be cached. No effect unlessQueryOptions.isResultCachingEnabled()returnstrue- Specified by:
getResultCacheRegionNamein interfaceQueryOptions
-
getLockOptions
public LockOptions getLockOptions()
Description copied from interface:QueryOptionsDescribes the locking to apply to the query results- Specified by:
getLockOptionsin interfaceQueryOptions
-
getComment
public String getComment()
Description copied from interface:QueryOptionsThe SQL comment to apply to the interpreted SQL query, for dialects which support SQL comments- Specified by:
getCommentin interfaceQueryOptions
-
getDatabaseHints
public List<String> getDatabaseHints()
Description copied from interface:QueryOptionsHints to apply to the interpreted SQL query- Specified by:
getDatabaseHintsin interfaceQueryOptions
-
getFetchSize
public Integer getFetchSize()
Description copied from interface:QueryOptionsThe fetch size to be applied to the JDBC query.- Specified by:
getFetchSizein interfaceQueryOptions- See Also:
Statement.getFetchSize()
-
getLimit
public Limit getLimit()
Description copied from interface:QueryOptionsThe limit to the query results. May also be accessed viaQueryOptions.getFirstRow()andQueryOptions.getMaxRows()- Specified by:
getLimitin interfaceQueryOptions
-
getFirstRow
public Integer getFirstRow()
Description copied from interface:QueryOptionsThe first row from the results to return- Specified by:
getFirstRowin interfaceQueryOptions- See Also:
QueryOptions.getLimit()
-
getMaxRows
public Integer getMaxRows()
Description copied from interface:QueryOptionsThe maximum number of rows to return from the results- Specified by:
getMaxRowsin interfaceQueryOptions- See Also:
QueryOptions.getLimit()
-
getEffectiveLimit
public Limit getEffectiveLimit()
Description copied from interface:QueryOptionsDetermine the effective paging limit to apply to the query. If the application did not explicitly specify paging limits,Limit.NONEis returned- Specified by:
getEffectiveLimitin interfaceQueryOptions- See Also:
QueryOptions.getLimit()
-
hasLimit
public boolean hasLimit()
Description copied from interface:QueryOptionsDid the application explicitly request paging limits?- Specified by:
hasLimitin interfaceQueryOptions- See Also:
QueryOptions.getLimit()
-
getUniqueSemantic
public ListResultsConsumer.UniqueSemantic getUniqueSemantic()
- Specified by:
getUniqueSemanticin interfaceQueryOptions
-
-