Class SqmSelectionQueryImpl<R>
- All Implemented Interfaces:
CommonQueryContract,SelectionQuery<R>,DomainQueryExecutionContext,SqmQuery<R>,CacheabilityInfluencers,InterpretationsKeySource,SqmSelectionQueryImplementor<R>,SqmSelectionQuery<R>
-
Field Summary
Fields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRING -
Constructor Summary
ConstructorsConstructorDescriptionSqmSelectionQueryImpl(String hql, HqlInterpretation<R> hqlInterpretation, Class<R> expectedResultType, SharedSessionContractImplementor session) Form used for HQL queriesSqmSelectionQueryImpl(NamedCriteriaQueryMementoImpl<?> memento, SqmSelectStatement<R> selectStatement, Class<R> expectedResultType, SharedSessionContractImplementor session) Creates aSelectionQueryinstance from a named criteria query memento.SqmSelectionQueryImpl(NamedHqlQueryMementoImpl<?> memento, Class<R> resultType, SharedSessionContractImplementor session) Creates aSelectionQueryinstance from a named HQL memento.SqmSelectionQueryImpl(SqmSelectStatement<R> criteria, boolean copyAst, Class<R> expectedResultType, SharedSessionContractImplementor session) Form used for criteria queriesSqmSelectionQueryImpl(SqmSelectStatement<R> criteria, Class<R> expectedResultType, SharedSessionContractImplementor session) Form used for criteria queries -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplySqmOptions(NamedSqmQueryMemento<?> memento) protected <T> voidbindCriteriaParameter(SqmJpaCriteriaParameterWrapper<T> sqmParameter) protected SelectQueryPlan<R> buildConcreteQueryPlan(SqmSelectStatement<R> concreteSqmStatement) protected <T> ConcreteSqmSelectQueryPlan<T> buildConcreteQueryPlan(SqmSelectStatement<T> concreteSqmStatement, Class<T> expectedResultType, TupleMetadata tupleMetadata, QueryOptions queryOptions) protected SelectQueryPlan<R> protected TupleMetadatabuildTupleMetadata(SqmStatement<?> statement, Class<R> resultType) protected voidcollectHints(Map<String, Object> hints) protected voidcopyParameterBindings(QueryParameterBindings oldParameterBindings) doList()protected ScrollableResultsImplementor<R> doScroll(ScrollMode scrollMode) protected void<T> TexecuteQuery(ResultsConsumer<T, R> resultsConsumer) protected intfirst(boolean hasLimit, SqmSelectStatement<?> sqmStatement) getKeyedResultList(KeyedPage<R> keyedPage) Execute the query and return the results for the given page, using key-based pagination.Get theParameterMetadataobject representing the parameters of this query, and providing access to theQueryParameters.The domain parameter bindingslongDetermine the size of the query result list that would be returned by callingSelectionQuery.getResultList()with no offset or limit applied to the query.Class<?> protected static booleanhasAppliedGraph(MutableQueryOptions queryOptions) protected static booleanhasLimit(SqmSelectStatement<?> sqm, MutableQueryOptions queryOptions) protected booleanprotected static <T> HqlInterpretation<T> interpretation(NamedSqmQueryMemento<?> memento, Class<T> expectedResultType, SharedSessionContractImplementor session) booleanShould the query plan of the query be stored in the query plan cache?protected intmax(boolean hasLimit, SqmSelectStatement<?> sqmStatement, List<R> list) protected booleanneedsDistinct(boolean containsCollectionFetches, boolean hasLimit, SqmSelectStatement<?> sqmStatement) protected voidprotected booleansetCacheable(boolean cacheable) Enable/disable second level query (result) caching for this query.setCacheMode(CacheMode cacheMode) Set the currentCacheModein effect for this query.setCacheRegion(String regionName) Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).setCacheRetrieveMode(CacheRetrieveMode cacheRetrieveMode) setCacheStoreMode(CacheStoreMode cacheStoreMode) setFetchSize(int fetchSize) Sets a JDBC fetch size hint for the query.setFlushMode(FlushModeType flushMode) Set theFlushModeto use for this query.setFollowOnLocking(boolean enable) Specifies whether follow-on locking should be applied?setHibernateFlushMode(FlushMode flushMode) Set the currentFlushModein effect for this query.setHibernateLockMode(LockMode lockMode) Specify the rootLockModefor the querysetLockMode(LockModeType lockMode) Specify the root LockModeType for the querysetLockScope(PessimisticLockScope lockScope) Apply a scope to any pessimistic locking applied to the query.Set the page of results to return.setParameter(int position, Object value) Bind the given argument to an ordinal query parameter.setParameter(int position, Instant value, TemporalType temporalType) Deprecated.setParameter(int position, Calendar value, TemporalType temporalType) Deprecated.setParameter(int position, Date value, TemporalType temporalType) Deprecated.<P> SqmSelectionQuery<R> setParameter(int position, P value, Type<P> type) Bind the given argument to an ordinal query parameter using the givenType.<P> SqmSelectionQuery<R> setParameter(int position, P value, Class<P> javaType) setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Deprecated.setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Deprecated.<P> SqmSelectionQuery<R> setParameter(Parameter<P> parameter, P value) setParameter(String name, Object value) Bind the given argument to a named query parameter.setParameter(String name, Instant value, TemporalType temporalType) Deprecated.setParameter(String name, Calendar value, TemporalType temporalType) Deprecated.setParameter(String name, Date value, TemporalType temporalType) Deprecated.<P> SqmSelectionQuery<R> setParameter(String name, P value, Type<P> type) Bind the given argument to a named query parameter using the givenType.<P> SqmSelectionQuery<R> setParameter(String name, P value, Class<P> javaType) <P> SqmSelectionQuery<R> setParameter(QueryParameter<P> parameter, P value) Bind an argument to the query parameter represented by the givenQueryParameter.<P> SqmSelectionQuery<R> setParameter(QueryParameter<P> parameter, P value, Type<P> type) Bind an argument to the query parameter represented by the givenQueryParameter, using the givenType.<P> SqmSelectionQuery<R> setParameter(QueryParameter<P> parameter, P value, Class<P> javaType) Bind an argument to the query parameter represented by the givenQueryParameter, using the givenClassreference to attempt to infer theTypeto use.setParameterList(int position, Object[] values) Bind multiple arguments to an ordinal query parameter.setParameterList(int position, Collection values) Bind multiple arguments to an ordinal query parameter.<P> SqmSelectionQuery<R> setParameterList(int position, Collection<? extends P> values, Type<P> type) Bind multiple arguments to an ordinal query parameter using the givenType.<P> SqmSelectionQuery<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaType) <P> SqmSelectionQuery<R> setParameterList(int position, P[] values, Type<P> type) Bind multiple arguments to an ordinal query parameter using the givenType.<P> SqmSelectionQuery<R> setParameterList(int position, P[] values, Class<P> javaType) setParameterList(String name, Object[] values) Bind multiple arguments to a named query parameter.setParameterList(String name, Collection values) Bind multiple arguments to a named query parameter.<P> SqmSelectionQuery<R> setParameterList(String name, Collection<? extends P> values, Type<P> type) Bind multiple arguments to a named query parameter using the givenType.<P> SqmSelectionQuery<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaType) Bind multiple arguments to a named query parameter using the givenClassreference to attempt to infer theTypeIf unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).<P> SqmSelectionQuery<R> setParameterList(String name, P[] values, Type<P> type) Bind multiple arguments to a named query parameter using the givenType.<P> SqmSelectionQuery<R> setParameterList(String name, P[] values, Class<P> javaType) Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theTypeto use.<P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values) Bind multiple arguments to the query parameter represented by the givenQueryParameter.<P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Type<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenType.<P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType) Bind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use.<P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, P[] values) Bind multiple arguments to the query parameter represented by the givenQueryParameter.<P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, P[] values, Type<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theType.<P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType) Bind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use.setProperties(Object bean) Bind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using heuristics.setProperties(Map map) Bind the values of the givenMapto named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.setQueryFlushMode(QueryFlushMode queryFlushMode) Set theQueryFlushModeto use for this query.setQueryPlanCacheable(boolean queryPlanCacheable) Enable/disable query plan caching for this query.setReadOnly(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by thisQuery.setResultListTransformer(ResultListTransformer<R> transformer) Set aResultListTransformer.protected voidsetTimeout(int timeout) Set the query timeout in seconds.setTimeout(Timeout timeout) Apply a timeout to the corresponding database query.<T> SqmSelectionQuery<T> setTupleTransformer(TupleTransformer<T> transformer) Set aTupleTransformer.Methods inherited from class org.hibernate.query.spi.AbstractSelectionQuery
afterQuery, afterQuery, afterQueryHandlingFetchProfiles, applyOptions, beforeQuery, beforeQueryHandlingFetchProfiles, disableFetchProfile, enableFetchProfile, getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getCallback, getFetchSize, getFlushMode, getHibernateLockMode, getLockMode, getLockOptions, getResultStream, getSingleResult, getSingleResultOrNull, hasCallbackActions, isCacheable, isReadOnly, list, requiresTxn, resetCallback, scroll, scroll, setComment, setEntityGraph, setFirstResult, setFollowOnStrategy, setHint, setLockMode, setLockScope, setMaxResults, stream, uniqueElement, uniqueResult, uniqueResultOptionalMethods inherited from class org.hibernate.query.spi.AbstractCommonQueryContract
applyCommentHint, applyDatabaseHint, applyEntityGraphHint, applyFlushModeHint, applyFollowOnLockingHint, applyFollowOnStrategyHint, applyGraph, applyGraph, applyHibernateLockMode, applyHint, applyLockModeHint, applyLockModeType, applyLockTimeoutHint, applyLockTimeoutHint, applySelectionHint, applySynchronizeSpacesHint, applyTimeoutHint, determineType, getComment, getExceptionConverter, getFirstResult, getHibernateFlushMode, getHints, getIntegerLiteral, getMaxResults, getMaxRows, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getQueryFlushMode, getQueryOptions, getSession, getSessionFactory, getTimeout, getTypeConfiguration, isBound, locateBinding, locateBinding, locateBinding, locateBinding, putIfNotNull, putIfNotNullMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.sqm.spi.CacheabilityInfluencers
getQueryOptionsMethods inherited from interface org.hibernate.query.CommonQueryContract
getComment, getFlushMode, getHibernateFlushMode, getQueryFlushMode, getTimeoutMethods inherited from interface org.hibernate.query.spi.DomainQueryExecutionContext
getQueryOptions, getSessionMethods inherited from interface org.hibernate.query.SelectionQuery
disableFetchProfile, enableFetchProfile, getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getFirstResult, getHibernateLockMode, getKeyedResultList, getLockMode, getLockOptions, getMaxResults, getResultList, getResultStream, getSingleResult, getSingleResultOrNull, isCacheable, isReadOnly, list, scroll, scroll, setComment, setEntityGraph, setFirstResult, setFollowOnStrategy, setHint, setLockMode, setLockScope, setMaxResults, setPage, stream, uniqueResult, uniqueResultOptionalMethods inherited from interface org.hibernate.query.spi.SqmQuery
getQueryOptions
-
Constructor Details
-
Method Details
-
getTupleMetadata
-
getSqmStatement
- Specified by:
getSqmStatementin interfaceCacheabilityInfluencers- Specified by:
getSqmStatementin interfaceSqmQuery<R>
-
setSqmStatement
-
getDomainParameterXref
-
getParameterMetadata
Description copied from interface:CommonQueryContractGet theParameterMetadataobject representing the parameters of this query, and providing access to theQueryParameters.- Specified by:
getParameterMetadatain interfaceCommonQueryContract- Specified by:
getParameterMetadatain interfaceSqmQuery<R>- Specified by:
getParameterMetadatain classAbstractCommonQueryContract
-
getQueryParameterBindings
Description copied from interface:DomainQueryExecutionContextThe domain parameter bindings- Specified by:
getQueryParameterBindingsin interfaceDomainQueryExecutionContext- Specified by:
getQueryParameterBindingsin classAbstractCommonQueryContract
-
getQueryString
- Specified by:
getQueryStringin interfaceCacheabilityInfluencers- Specified by:
getQueryStringin interfaceSqmQuery<R>- Specified by:
getQueryStringin classAbstractSelectionQuery<R>
-
getQueryStringCacheKey
- Specified by:
getQueryStringCacheKeyin interfaceCacheabilityInfluencers
-
setTupleTransformer
Description copied from interface:SelectionQuerySet aTupleTransformer.- Specified by:
setTupleTransformerin interfaceSelectionQuery<R>- Specified by:
setTupleTransformerin interfaceSqmSelectionQuery<R>
-
setResultListTransformer
Description copied from interface:SelectionQuerySet aResultListTransformer.- Specified by:
setResultListTransformerin interfaceSelectionQuery<R>- Specified by:
setResultListTransformerin interfaceSqmSelectionQuery<R>
-
prepareForExecution
protected void prepareForExecution()- Specified by:
prepareForExecutionin classAbstractSelectionQuery<R>
-
getResultCount
public long getResultCount()Description copied from interface:SelectionQueryDetermine the size of the query result list that would be returned by callingSelectionQuery.getResultList()with no offset or limit applied to the query.- Specified by:
getResultCountin interfaceSelectionQuery<R>- Returns:
- the size of the list that would be returned
-
doList
- Specified by:
doListin classAbstractSelectionQuery<R>
-
doScroll
- Specified by:
doScrollin classAbstractSelectionQuery<R>
-
executeQuery
- Specified by:
executeQueryin interfaceSqmSelectionQueryImplementor<R>
-
getExpectedResultType
-
getResultType
- Specified by:
getResultTypein interfaceDomainQueryExecutionContext- Specified by:
getResultTypein interfaceInterpretationsKeySource
-
getLoadQueryInfluencers
- Specified by:
getLoadQueryInfluencersin interfaceCacheabilityInfluencers
-
hasMultiValuedParameterBindingsChecker
- Specified by:
hasMultiValuedParameterBindingsCheckerin interfaceCacheabilityInfluencers
-
hasMultiValuedParameterBindings
protected boolean hasMultiValuedParameterBindings() -
resolveJdbcParameterTypeIfNecessary
protected boolean resolveJdbcParameterTypeIfNecessary()- Specified by:
resolveJdbcParameterTypeIfNecessaryin classAbstractCommonQueryContract
-
setFlushMode
Description copied from interface:CommonQueryContractSet theFlushModeto use for this query.Setting this to
nullultimately indicates to use theFlushModeof the session. UseCommonQueryContract.setHibernateFlushMode(org.hibernate.FlushMode)passingFlushMode.MANUALinstead to indicate that no automatic flushing should occur.- Specified by:
setFlushModein interfaceCommonQueryContract- Specified by:
setFlushModein interfaceSelectionQuery<R>- Overrides:
setFlushModein classAbstractSelectionQuery<R>- See Also:
-
setLockMode
Specify the root LockModeType for the query- Specified by:
setLockModein interfaceSelectionQuery<R>- Overrides:
setLockModein classAbstractSelectionQuery<R>- See Also:
-
setHibernateLockMode
Specify the rootLockModefor the query- Specified by:
setHibernateLockModein interfaceSelectionQuery<R>- Overrides:
setHibernateLockModein classAbstractSelectionQuery<R>- See Also:
-
setTimeout
Description copied from interface:CommonQueryContractApply a timeout to the corresponding database query.- Specified by:
setTimeoutin interfaceCommonQueryContract- Overrides:
setTimeoutin classAbstractSelectionQuery<R>- Parameters:
timeout- The timeout to apply- Returns:
this, for method chaining
-
setLockScope
Description copied from interface:SelectionQueryApply a scope to any pessimistic locking applied to the query.- Specified by:
setLockScopein interfaceSelectionQuery<R>- Overrides:
setLockScopein classAbstractSelectionQuery<R>- Parameters:
lockScope- The lock scope to apply- Returns:
this, for method chaining
-
setFollowOnLocking
Specifies whether follow-on locking should be applied?- Specified by:
setFollowOnLockingin interfaceSelectionQuery<R>- Overrides:
setFollowOnLockingin classAbstractSelectionQuery<R>
-
setFetchSize
Description copied from interface:SelectionQuerySets a JDBC fetch size hint for the query.- Specified by:
setFetchSizein interfaceSelectionQuery<R>- Specified by:
setFetchSizein interfaceSqmSelectionQuery<R>- Overrides:
setFetchSizein classAbstractSelectionQuery<R>- Parameters:
fetchSize- the fetch size hint- Returns:
this, for method chaining- See Also:
-
setReadOnly
Description copied from interface:SelectionQuerySet the read-only/modifiable mode for entities and proxies loaded by thisQuery. This setting overrides the default setting for the persistence context,Session.isDefaultReadOnly().To set the default read-only/modifiable setting used for entities and proxies that are loaded into the session, use
Session.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 beforeQuery the query was executed.
- Specified by:
setReadOnlyin interfaceSelectionQuery<R>- Specified by:
setReadOnlyin interfaceSqmSelectionQuery<R>- Overrides:
setReadOnlyin classAbstractSelectionQuery<R>- Parameters:
readOnly-trueindicates that entities and proxies loaded by the query are to be put in read-only mode;falseindicates that entities and proxies loaded by the query will be put in modifiable mode- Returns:
this, for method chaining
-
setCacheMode
Description copied from interface:SelectionQuerySet the currentCacheModein effect for this query.Set it to
nullto indicate that theCacheModeof thesessionshould be used.- Specified by:
setCacheModein interfaceSelectionQuery<R>- Specified by:
setCacheModein interfaceSqmSelectionQuery<R>- Overrides:
setCacheModein classAbstractSelectionQuery<R>- See Also:
-
setCacheRetrieveMode
- Specified by:
setCacheRetrieveModein interfaceSelectionQuery<R>- Overrides:
setCacheRetrieveModein classAbstractSelectionQuery<R>- See Also:
-
setCacheStoreMode
- Specified by:
setCacheStoreModein interfaceSelectionQuery<R>- Overrides:
setCacheStoreModein classAbstractSelectionQuery<R>- See Also:
-
setCacheable
Description copied from interface:SelectionQueryEnable/disable second level query (result) caching for this query.- Specified by:
setCacheablein interfaceSelectionQuery<R>- Specified by:
setCacheablein interfaceSqmSelectionQuery<R>- Overrides:
setCacheablein classAbstractSelectionQuery<R>- See Also:
-
setCacheRegion
Description copied from interface:SelectionQuerySet the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).nullindicates to use the default region.- Specified by:
setCacheRegionin interfaceSelectionQuery<R>- Specified by:
setCacheRegionin interfaceSqmSelectionQuery<R>- Overrides:
setCacheRegionin classAbstractSelectionQuery<R>- See Also:
-
setQueryPlanCacheable
Description copied from interface:SelectionQueryEnable/disable query plan caching for this query.- Specified by:
setQueryPlanCacheablein interfaceSelectionQuery<R>- Overrides:
setQueryPlanCacheablein classAbstractSelectionQuery<R>- See Also:
-
isQueryPlanCacheable
public boolean isQueryPlanCacheable()Description copied from interface:SelectionQueryShould the query plan of the query be stored in the query plan cache?- Specified by:
isQueryPlanCacheablein interfaceCacheabilityInfluencers- Specified by:
isQueryPlanCacheablein interfaceSelectionQuery<R>- Overrides:
isQueryPlanCacheablein classAbstractSelectionQuery<R>
-
collectHints
- Overrides:
collectHintsin classAbstractSelectionQuery<R>
-
setHibernateFlushMode
Description copied from interface:CommonQueryContractSet the currentFlushModein effect for this query.- Specified by:
setHibernateFlushModein interfaceCommonQueryContract- Specified by:
setHibernateFlushModein interfaceSelectionQuery<R>- Specified by:
setHibernateFlushModein interfaceSqmQuery<R>- Specified by:
setHibernateFlushModein interfaceSqmSelectionQuery<R>- Overrides:
setHibernateFlushModein classAbstractSelectionQuery<R>- See Also:
-
setQueryFlushMode
Description copied from interface:CommonQueryContractSet theQueryFlushModeto use for this query.- Specified by:
setQueryFlushModein interfaceCommonQueryContract- Specified by:
setQueryFlushModein interfaceSelectionQuery<R>- Specified by:
setQueryFlushModein interfaceSqmQuery<R>- Specified by:
setQueryFlushModein interfaceSqmSelectionQuery<R>- Overrides:
setQueryFlushModein classAbstractSelectionQuery<R>- See Also:
-
setTimeout
Description copied from interface:CommonQueryContractSet the query timeout in seconds.Any value set here is eventually passed directly along to the JDBC statement, which expressly disallows negative values. So negative values should be avoided as a general rule, although certain "magic values" are handled - see Timeouts.NO_WAIT.
A value of zero indicates no timeout.
- Specified by:
setTimeoutin interfaceCommonQueryContract- Specified by:
setTimeoutin interfaceSelectionQuery<R>- Specified by:
setTimeoutin interfaceSqmSelectionQuery<R>- Overrides:
setTimeoutin classAbstractSelectionQuery<R>- Parameters:
timeout- the timeout in seconds- Returns:
this, for method chaining- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type", or pass a
TypedParameterValue.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(String, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>
-
setParameter
@Deprecated public SqmSelectionQuery<R> setParameter(String name, Instant value, TemporalType temporalType) Deprecated.Description copied from interface:CommonQueryContractBind anInstantto the named query parameter using just the portion indicated by the givenTemporalType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type", or pass a
TypedParameterValue.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(int, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>
-
setParameter
@Deprecated public SqmSelectionQuery<R> setParameter(int position, Instant value, TemporalType temporalType) Deprecated.Description copied from interface:CommonQueryContractBind anInstantto an ordinal query parameter using just the portion indicated by the givenTemporalType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>
-
setParameter
Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be null- Returns:
this, for method chaining- See Also:
-
setParameter
public <P> SqmSelectionQuery<R> setParameter(QueryParameter<P> parameter, P value, Class<P> javaType) Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(QueryParameter, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulljavaType- aTyperepresenting the type of the parameter- Returns:
this, for method chaining- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulltype- aTyperepresenting the type of the parameter- Returns:
this, for method chaining
-
setParameter
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQuery<R> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQuery<R> setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQuery<R> setParameter(String name, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQuery<R> setParameter(String name, Date value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQuery<R> setParameter(int position, Calendar value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
@Deprecated public SqmSelectionQuery<R> setParameter(int position, Date value, TemporalType temporalType) Deprecated.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery<R>- Specified by:
setParameterin interfaceSqmSelectionQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter.The "type mapping" for the binding is inferred from the type of the first collection element.
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenClassreference to attempt to infer theTypeIf unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(String name, Collection<? extends P> values, Type<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the given Class reference to attempt to determine theTypeto use. If unable to determine an appropriateType,CommonQueryContract.setParameterList(String, Collection)is used- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(int position, Collection<? extends P> values, Type<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter.The type of the parameter is inferred from the context in which it occurs, and from the type of the first given argument.
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Type<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter.The type of the parameter is inferred between the context in which it occurs, the type associated with the
QueryParameterand the type of the first given argument.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, P[] values, Type<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery<R>- Specified by:
setParameterListin interfaceSqmSelectionQuery<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setProperties
Description copied from interface:CommonQueryContractBind the values of the givenMapto named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.- Specified by:
setPropertiesin interfaceCommonQueryContract- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Specified by:
setPropertiesin interfaceSqmQuery<R>- Specified by:
setPropertiesin interfaceSqmSelectionQuery<R>- Overrides:
setPropertiesin classAbstractSelectionQuery<R>- Parameters:
map- aMapof names to arguments- Returns:
this, for method chaining
-
setProperties
Description copied from interface:CommonQueryContractBind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using heuristics.- Specified by:
setPropertiesin interfaceCommonQueryContract- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Specified by:
setPropertiesin interfaceSqmQuery<R>- Specified by:
setPropertiesin interfaceSqmSelectionQuery<R>- Overrides:
setPropertiesin classAbstractSelectionQuery<R>- Parameters:
bean- any JavaBean or POJO- Returns:
this, for method chaining
-
max
-
first
-
hasLimit
-
needsDistinct
protected boolean needsDistinct(boolean containsCollectionFetches, boolean hasLimit, SqmSelectStatement<?> sqmStatement) -
hasAppliedGraph
-
errorOrLogForPaginationWithCollectionFetch
protected void errorOrLogForPaginationWithCollectionFetch() -
copyParameterBindings
-
bindCriteriaParameter
-
setPage
Description copied from interface:SelectionQuerySet the page of results to return.- See Also:
-
getKeyedResultList
Description copied from interface:SelectionQueryExecute the query and return the results for the given page, using key-based pagination.- Parameters:
keyedPage- the key-based specification of the page as an instance ofKeyedPage- Returns:
- the query results and the key of the next page
as an instance of
KeyedResultList - See Also:
-
buildSelectQueryPlan
-
buildConcreteQueryPlan
-
buildConcreteQueryPlan
protected <T> ConcreteSqmSelectQueryPlan<T> buildConcreteQueryPlan(SqmSelectStatement<T> concreteSqmStatement, Class<T> expectedResultType, TupleMetadata tupleMetadata, QueryOptions queryOptions) -
applySqmOptions
-
buildTupleMetadata
-