Package org.hibernate.query.spi
Class SqlOmittingQueryOptions
- java.lang.Object
-
- org.hibernate.query.spi.DelegatingQueryOptions
-
- org.hibernate.query.spi.SqlOmittingQueryOptions
-
- All Implemented Interfaces:
QueryOptions
public class SqlOmittingQueryOptions extends DelegatingQueryOptions
-
-
Field Summary
-
Fields inherited from interface org.hibernate.query.spi.QueryOptions
NONE, READ_ONLY, READ_WRITE
-
-
Constructor Summary
Constructors Constructor Description SqlOmittingQueryOptions(QueryOptions queryOptions, boolean omitLimit, boolean omitLocks)
SqlOmittingQueryOptions(QueryOptions queryOptions, boolean omitLimit, boolean omitLocks, ListResultsConsumer.UniqueSemantic semantic)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Limit
getEffectiveLimit()
Determine the effective paging limit to apply to the query.Integer
getFetchSize()
The fetch size to be applied to the JDBC query.Integer
getFirstRow()
The first row from the results to returnLimit
getLimit()
The limit to the query results.LockOptions
getLockOptions()
Describes the locking to apply to the query resultsInteger
getMaxRows()
The maximum number of rows to return from the resultsListResultsConsumer.UniqueSemantic
getUniqueSemantic()
boolean
hasLimit()
Did the application explicitly request paging limits?static QueryOptions
omitSqlQueryOptions(QueryOptions originalOptions)
static QueryOptions
omitSqlQueryOptions(QueryOptions originalOptions, boolean omitLimit, boolean omitLocks)
static QueryOptions
omitSqlQueryOptions(QueryOptions originalOptions, JdbcOperationQuerySelect select)
static QueryOptions
omitSqlQueryOptionsWithUniqueSemanticFilter(QueryOptions originalOptions, boolean omitLimit, boolean omitLocks)
-
Methods inherited from class org.hibernate.query.spi.DelegatingQueryOptions
getAppliedGraph, getCacheMode, getCacheRetrieveMode, getCacheStoreMode, getComment, getDatabaseHints, getDisabledFetchProfiles, getEnabledFetchProfiles, getFlushMode, getQueryPlanCachingEnabled, getResultCacheRegionName, getResultListTransformer, getTimeout, getTupleTransformer, isReadOnly, isResultCachingEnabled
-
-
-
-
Constructor Detail
-
SqlOmittingQueryOptions
public SqlOmittingQueryOptions(QueryOptions queryOptions, boolean omitLimit, boolean omitLocks)
-
SqlOmittingQueryOptions
public SqlOmittingQueryOptions(QueryOptions queryOptions, boolean omitLimit, boolean omitLocks, ListResultsConsumer.UniqueSemantic semantic)
-
-
Method Detail
-
omitSqlQueryOptions
public static QueryOptions omitSqlQueryOptions(QueryOptions originalOptions)
-
omitSqlQueryOptions
public static QueryOptions omitSqlQueryOptions(QueryOptions originalOptions, JdbcOperationQuerySelect select)
-
omitSqlQueryOptions
public static QueryOptions omitSqlQueryOptions(QueryOptions originalOptions, boolean omitLimit, boolean omitLocks)
-
omitSqlQueryOptionsWithUniqueSemanticFilter
public static QueryOptions omitSqlQueryOptionsWithUniqueSemanticFilter(QueryOptions originalOptions, boolean omitLimit, boolean omitLocks)
-
getLockOptions
public LockOptions getLockOptions()
Description copied from interface:QueryOptions
Describes the locking to apply to the query results- Specified by:
getLockOptions
in interfaceQueryOptions
- Overrides:
getLockOptions
in classDelegatingQueryOptions
-
getFetchSize
public Integer getFetchSize()
Description copied from interface:QueryOptions
The fetch size to be applied to the JDBC query.- Specified by:
getFetchSize
in interfaceQueryOptions
- Overrides:
getFetchSize
in classDelegatingQueryOptions
- See Also:
Statement.getFetchSize()
-
getLimit
public Limit 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
- Overrides:
getLimit
in classDelegatingQueryOptions
-
getFirstRow
public Integer getFirstRow()
Description copied from interface:QueryOptions
The first row from the results to return- Specified by:
getFirstRow
in interfaceQueryOptions
- Overrides:
getFirstRow
in classDelegatingQueryOptions
- See Also:
QueryOptions.getLimit()
-
getMaxRows
public Integer getMaxRows()
Description copied from interface:QueryOptions
The maximum number of rows to return from the results- Specified by:
getMaxRows
in interfaceQueryOptions
- Overrides:
getMaxRows
in classDelegatingQueryOptions
- See Also:
QueryOptions.getLimit()
-
getEffectiveLimit
public Limit getEffectiveLimit()
Description copied from interface:QueryOptions
Determine the effective paging limit to apply to the query. If the application did not explicitly specify paging limits,Limit.NONE
is returned- Specified by:
getEffectiveLimit
in interfaceQueryOptions
- Overrides:
getEffectiveLimit
in classDelegatingQueryOptions
- See Also:
QueryOptions.getLimit()
-
hasLimit
public boolean hasLimit()
Description copied from interface:QueryOptions
Did the application explicitly request paging limits?- Specified by:
hasLimit
in interfaceQueryOptions
- Overrides:
hasLimit
in classDelegatingQueryOptions
- See Also:
QueryOptions.getLimit()
-
getUniqueSemantic
public ListResultsConsumer.UniqueSemantic getUniqueSemantic()
- Specified by:
getUniqueSemantic
in interfaceQueryOptions
- Overrides:
getUniqueSemantic
in classDelegatingQueryOptions
-
-