Class QuerySqmImpl<R>
- All Implemented Interfaces:
Query,TypedQuery<R>,CommonQueryContract,SqmQueryImplementor<R>,MutationQuery,NameableQuery,Query<R>,SelectionQuery<R>,DomainQueryExecutionContext,QueryImplementor<R>,SqmQuery,SqmInterpretationsKey.CacheabilityInfluencers,SqmInterpretationsKey.InterpretationsKeySource
Query implementation based on an SQM- Author:
- Steve Ebersole
-
Field Summary
Fields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRING -
Constructor Summary
ConstructorsConstructorDescriptionQuerySqmImpl(String hql, HqlInterpretation<R> hqlInterpretation, Class<R> resultType, SharedSessionContractImplementor session) Form used for HQL queriesQuerySqmImpl(NamedCriteriaQueryMementoImpl memento, Class<R> resultType, SharedSessionContractImplementor session) QuerySqmImpl(NamedHqlQueryMementoImpl memento, Class<R> expectedResultType, SharedSessionContractImplementor session) Creates a Query instance from a named HQL mementoQuerySqmImpl(SqmStatement<R> criteria, Class<R> expectedResultType, SharedSessionContractImplementor producer) Form used for criteria queries -
Method Summary
Modifier and TypeMethodDescriptionaddQueryHint(String hint) Add a database query hint to the SQL query.protected voidapplyAliasSpecificLockModeHint(String hintName, Object value) protected voidapplyFollowOnLockingHint(Boolean followOnLocking) applyGraph(RootGraph graph, GraphSemantic semantic) Apply the given graph using the given semanticprotected voidapplyHibernateLockMode(LockMode value) protected voidapplyLockModeType(LockModeType value) protected voidapplyLockTimeoutHint(int timeout) protected voidapplyLockTimeoutHint(Integer timeout) protected voidapplyOptions(NamedSqmQueryMemento memento) 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) disableFetchProfile(String profileName) Disable thefetch profilewith the given name in this session.protected intdoList()protected ScrollableResultsImplementor<R>doScroll(ScrollMode scrollMode) enableFetchProfile(String profileName) Enable thefetch profilefor this query.protected voidintExecute an insert, update, or delete statement, and return the number of affected entities.protected DomainQueryExecutionContextexecutionContextForDoList(boolean containsCollectionFetches, boolean hasLimit, boolean needsDistinct) protected intfirst(boolean hasLimit, SqmSelectStatement<?> sqmStatement) The JPAFlushModeTypein effect for this query.getKeyedResultList(KeyedPage<R> keyedPage) Execute the query and return the results for the given page, using key-based pagination.Get the rootLockModeTypefor the queryAccess to information about query parameters.The domain parameter bindingsThe query as a string, ornullin the case of a criteria query.longDetermine the size of the query result list that would be returned by callingSelectionQuery.getResultList()with no offset or limit applied to the query.protected static booleanhasAppliedGraph(MutableQueryOptions queryOptions) protected booleanhasIdentifierAssigned(SqmInsertStatement<?> sqmInsert, EntityPersister entityDescriptor) protected static booleanhasLimit(SqmSelectStatement<?> sqm, MutableQueryOptions queryOptions) protected booleanprotected static <T> HqlInterpretation<T>interpretation(NamedHqlQueryMementoImpl memento, Class<T> expectedResultType, SharedSessionContractImplementor session) booleanShould the query plan of the query be stored in the query plan cache?protected booleanisSimpleValuesInsert(SqmInsertStatement<?> sqmInsert, EntityPersister entityDescriptor) 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 cacheRegion) Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).setCacheRetrieveMode(CacheRetrieveMode cacheRetrieveMode) setCacheStoreMode(CacheStoreMode cacheStoreMode) setComment(String comment) Set a comment for this query.setEntityGraph(EntityGraph<R> graph, GraphSemantic semantic) Apply anEntityGraphto the query.setFetchSize(int fetchSize) Sets a JDBC fetch size hint for the query.setFirstResult(int startPosition) Set the first row position to return from the query results.setFlushMode(FlushModeType flushMode) Set theFlushModein to use for this query.setHibernateFlushMode(FlushMode flushMode) Set the currentFlushModein effect for this query.Set a hint.setLockMode(LockModeType lockMode) Specify the root LockModeType for the querysetLockMode(String alias, LockMode lockMode) Specify aLockModeto apply to a specific alias defined in the querysetLockOptions(LockOptions lockOptions) Apply the given lock options to this query.setMaxResults(int maxResult) Set the max number of rows requested for the query results.voidsetOptionalEntityName(String entityName) voidvoidsetOptionalObject(Object optionalObject) If the result type of this query is an entity class, add one or more rules for ordering the query results.If the result type of this query is an entity class, add a rule for ordering the query results.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) Bind anInstantto an ordinal query parameter using just the portion indicated by the givenTemporalType.setParameter(int position, Calendar value, TemporalType temporalType) QueryoverridesetParameter(int position, Date value, TemporalType temporalType) Queryoverride<P> SqmQueryImplementor<R>setParameter(int position, P value, Class<P> javaType) Bind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmQueryImplementor<R>setParameter(int position, P value, BindableType<P> type) Bind the given argument to an ordinal query parameter using the givenBindableType.setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) QueryoverridesetParameter(Parameter<Date> param, Date value, TemporalType temporalType) Queryoverride<P> SqmQueryImplementor<R>setParameter(Parameter<P> parameter, P value) QueryoverridesetParameter(String name, Object value) Bind the given argument to a named query parameter.setParameter(String name, Instant value, TemporalType temporalType) Bind anInstantto the named query parameter using just the portion indicated by the givenTemporalType.setParameter(String name, Calendar value, TemporalType temporalType) QueryoverridesetParameter(String name, Date value, TemporalType temporalType) Queryoverride<P> SqmQueryImplementor<R>setParameter(String name, P value, Class<P> javaType) Bind the given argument to a named query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmQueryImplementor<R>setParameter(String name, P value, BindableType<P> type) Bind the given argument to a named query parameter using the givenBindableType.<P> SqmQueryImplementor<R>setParameter(QueryParameter<P> parameter, P value) Bind an argument to the query parameter represented by the givenQueryParameter.<P> SqmQueryImplementor<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 theBindableTypeto use.<P> SqmQueryImplementor<R>setParameter(QueryParameter<P> parameter, P value, BindableType<P> type) Bind an argument to the query parameter represented by the givenQueryParameter, using the givenBindableType.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> SqmQueryImplementor<R>setParameterList(int position, Collection<? extends P> values, Class<P> javaType) Bind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmQueryImplementor<R>setParameterList(int position, Collection<? extends P> values, BindableType<P> type) Bind multiple arguments to an ordinal query parameter using the givenBindableType.<P> SqmQueryImplementor<R>setParameterList(int position, P[] values, Class<P> javaType) Bind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType.<P> SqmQueryImplementor<R>setParameterList(int position, P[] values, BindableType<P> type) Bind multiple arguments to an ordinal query parameter using the givenBindableType.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> SqmQueryImplementor<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 theBindableTypeIf unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).<P> SqmQueryImplementor<R>setParameterList(String name, Collection<? extends P> values, BindableType<P> type) Bind multiple arguments to a named query parameter using the givenBindableType.<P> SqmQueryImplementor<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 theBindableTypeto use.<P> SqmQueryImplementor<R>setParameterList(String name, P[] values, BindableType<P> type) Bind multiple arguments to a named query parameter using the givenBindableType.<P> SqmQueryImplementor<R>setParameterList(QueryParameter<P> parameter, Collection<? extends P> values) Bind multiple arguments to the query parameter represented by the givenQueryParameter.<P> SqmQueryImplementor<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 theBindableTypeto use.<P> SqmQueryImplementor<R>setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenBindableType.<P> SqmQueryImplementor<R>setParameterList(QueryParameter<P> parameter, P[] values) Bind multiple arguments to the query parameter represented by the givenQueryParameter.<P> SqmQueryImplementor<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 theBindableTypeto use.<P> SqmQueryImplementor<R>setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theBindableType.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 bean) 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.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.<T> SqmQueryImplementor<T>setTupleTransformer(TupleTransformer<T> transformer) Set aTupleTransformer.Convert the query into the mementostatic QueryOptionsuniqueSemanticQueryOptions(QueryOptions originalOptions) <T> TReturn an object of the specified type to allow access to the provider-specific API.protected static voidvalidateCriteriaQuery(SqmQueryPart<?> queryPart) protected voidprotected voidMethods inherited from class org.hibernate.query.spi.AbstractSelectionQuery
afterQuery, afterQuery, afterQueryHandlingFetchProfiles, applyOptions, beforeQuery, beforeQueryHandlingFetchProfiles, getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getCallback, getFetchSize, getHibernateLockMode, getLockOptions, getResultStream, getSessionFactory, getSingleResult, getSingleResultOrNull, hasCallbackActions, isCacheable, isReadOnly, list, requiresTxn, resetCallback, scroll, scroll, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockMode, stream, uniqueElement, uniqueResult, uniqueResultOptionalMethods inherited from class org.hibernate.query.spi.AbstractCommonQueryContract
applyAdditionalPossibleHints, applyCacheableHint, applyCacheModeHint, applyCacheRegionHint, applyCommentHint, applyDatabaseHint, applyEntityGraphHint, applyFetchSizeHint, applyFirstResult, applyFlushModeHint, applyGraph, applyGraph, applyHint, applyJpaCacheRetrieveModeHint, applyJpaCacheStoreModeHint, applyJpaFlushMode, applyLockModeHint, applyMaxResults, applyQueryPlanCacheableHint, applyResultListTransformer, applySelectionHint, applySynchronizeSpacesHint, applyTimeoutHint, applyTupleTransformer, determineType, getComment, getFirstResult, getHibernateFlushMode, getHints, getIntegerLiteral, getJpaFlushMode, getMaxResults, getMaxRows, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getQueryOptions, getSession, getTimeout, 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.CommonQueryContract
getHibernateFlushMode, getTimeoutMethods inherited from interface org.hibernate.query.spi.DomainQueryExecutionContext
getCallback, getQueryOptions, getSession, hasCallbackActionsMethods inherited from interface jakarta.persistence.Query
getFirstResult, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBoundMethods inherited from interface org.hibernate.query.Query
getComment, getLockOptions, getQueryOptions, getResultList, getResultStream, getSingleResult, list, stream, uniqueResult, uniqueResultOptionalMethods inherited from interface org.hibernate.query.spi.QueryImplementor
getSession, scroll, scrollMethods inherited from interface org.hibernate.query.SelectionQuery
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getFirstResult, getHibernateLockMode, getKeyedResultList, getMaxResults, getSingleResultOrNull, isCacheable, isReadOnly, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockModeMethods inherited from interface org.hibernate.query.sqm.internal.SqmInterpretationsKey.CacheabilityInfluencers
getQueryOptionsMethods inherited from interface org.hibernate.query.spi.SqmQuery
getQueryOptionsMethods inherited from interface org.hibernate.query.hql.spi.SqmQueryImplementor
applyFetchGraph, applyLoadGraph, setResultTransformer
-
Constructor Details
-
Method Details
-
getTupleMetadata
-
getQueryString
Description copied from interface:QueryThe query as a string, ornullin the case of a criteria query.- Specified by:
getQueryStringin interfaceQuery<R>- Specified by:
getQueryStringin interfaceSqmInterpretationsKey.CacheabilityInfluencers- Specified by:
getQueryStringin interfaceSqmQuery- Specified by:
getQueryStringin classAbstractSelectionQuery<R>
-
getSqmStatement
- Specified by:
getSqmStatementin interfaceSqmInterpretationsKey.CacheabilityInfluencers- Specified by:
getSqmStatementin interfaceSqmQuery- Specified by:
getSqmStatementin interfaceSqmQueryImplementor<R>
-
setSqmStatement
-
getDomainParameterXref
-
getParameterMetadata
Description copied from interface:QueryAccess to information about query parameters.- Specified by:
getParameterMetadatain interfaceQuery<R>- Specified by:
getParameterMetadatain interfaceSqmQuery- Specified by:
getParameterMetadatain interfaceSqmQueryImplementor<R>- Specified by:
getParameterMetadatain classAbstractCommonQueryContract- Returns:
- information about query parameters.
-
getQueryParameterBindings
Description copied from interface:DomainQueryExecutionContextThe domain parameter bindings- Specified by:
getQueryParameterBindingsin interfaceDomainQueryExecutionContext- Specified by:
getQueryParameterBindingsin classAbstractCommonQueryContract
-
getParameterBindings
- Specified by:
getParameterBindingsin interfaceQueryImplementor<R>
-
getResultType
- Specified by:
getResultTypein interfaceDomainQueryExecutionContext- Specified by:
getResultTypein interfaceSqmInterpretationsKey.InterpretationsKeySource
-
getExpectedResultType
-
getLoadQueryInfluencers
- Specified by:
getLoadQueryInfluencersin interfaceSqmInterpretationsKey.CacheabilityInfluencers
-
resolveJdbcParameterTypeIfNecessary
protected boolean resolveJdbcParameterTypeIfNecessary()- Specified by:
resolveJdbcParameterTypeIfNecessaryin classAbstractCommonQueryContract
-
hasMultiValuedParameterBindingsChecker
- Specified by:
hasMultiValuedParameterBindingsCheckerin interfaceSqmInterpretationsKey.CacheabilityInfluencers
-
hasMultiValuedParameterBindings
protected boolean hasMultiValuedParameterBindings() -
prepareForExecution
protected void prepareForExecution()- Specified by:
prepareForExecutionin classAbstractSelectionQuery<R>
-
verifySelect
protected void verifySelect() -
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>
-
executionContextForDoList
protected DomainQueryExecutionContext executionContextForDoList(boolean containsCollectionFetches, boolean hasLimit, boolean needsDistinct) -
uniqueSemanticQueryOptions
-
doScroll
- Specified by:
doScrollin classAbstractSelectionQuery<R>
-
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 interfaceSelectionQuery<R>- Specified by:
isQueryPlanCacheablein interfaceSqmInterpretationsKey.CacheabilityInfluencers- Overrides:
isQueryPlanCacheablein classAbstractSelectionQuery<R>
-
executeUpdate
public int executeUpdate()Description copied from interface:QueryExecute an insert, update, or delete statement, and return the number of affected entities.For use with instances of
MutationQuerycreated usingQueryProducer.createMutationQuery(String),QueryProducer.createNamedMutationQuery(String),QueryProducer.createNativeMutationQuery(String),QueryProducer.createQuery(jakarta.persistence.criteria.CriteriaUpdate), orQueryProducer.createQuery(jakarta.persistence.criteria.CriteriaDelete).- Specified by:
executeUpdatein interfaceMutationQuery- Specified by:
executeUpdatein interfaceQuery- Specified by:
executeUpdatein interfaceQuery<R>- Returns:
- the number of affected entity instances (may differ from the number of affected rows)
- See Also:
-
verifyUpdate
protected void verifyUpdate() -
doExecuteUpdate
protected int doExecuteUpdate() -
hasIdentifierAssigned
protected boolean hasIdentifierAssigned(SqmInsertStatement<?> sqmInsert, EntityPersister entityDescriptor) -
isSimpleValuesInsert
protected boolean isSimpleValuesInsert(SqmInsertStatement<?> sqmInsert, EntityPersister entityDescriptor) -
addQueryHint
Description copied from interface:QueryAdd a database query hint to the SQL query.A database hint is a completely different concept to a JPA hint specified using
QueryHintorQuery.getHints(). These are hints to the JPA provider.Multiple query hints may be specified. The operation
Dialect.getQueryHintString(String, List)determines how the hint is actually added to the SQL query.- Specified by:
addQueryHintin interfaceQuery<R>- Specified by:
addQueryHintin interfaceSqmQueryImplementor<R>- Parameters:
hint- The database specific query hint to add.
-
setLockOptions
Description copied from interface:QueryApply the given lock options to this query. Alias-specific lock modes in the given lock options are merged with any alias-specific lock mode which have already been set. If a lock mode has already been specified for an alias that is among the aliases in the given lock options, the lock mode specified in the given lock options overrides the lock mode that was already set.- Specified by:
setLockOptionsin interfaceQuery<R>- Specified by:
setLockOptionsin interfaceSqmQueryImplementor<R>- Parameters:
lockOptions- The lock options to apply to the query.- Returns:
this, for method chaining- See Also:
-
setLockMode
Description copied from interface:SelectionQuerySpecify aLockModeto apply to a specific alias defined in the query- Specified by:
setLockModein interfaceQuery<R>- Specified by:
setLockModein interfaceSelectionQuery<R>- Specified by:
setLockModein interfaceSqmQueryImplementor<R>- Overrides:
setLockModein classAbstractSelectionQuery<R>- Parameters:
alias- A query aliaslockMode- The lock mode to apply- Returns:
this, for method chaining- See Also:
-
setTupleTransformer
Description copied from interface:QuerySet aTupleTransformer.- Specified by:
setTupleTransformerin interfaceQuery<R>- Specified by:
setTupleTransformerin interfaceQueryImplementor<R>- Specified by:
setTupleTransformerin interfaceSqmQueryImplementor<R>
-
setResultListTransformer
Description copied from interface:QuerySet aResultListTransformer.- Specified by:
setResultListTransformerin interfaceQuery<R>- Specified by:
setResultListTransformerin interfaceQueryImplementor<R>- Specified by:
setResultListTransformerin interfaceSqmQueryImplementor<R>
-
setMaxResults
Description copied from interface:SelectionQuerySet the max number of rows requested for the query results. Applied to the SQL query- Specified by:
setMaxResultsin interfaceQuery- Specified by:
setMaxResultsin interfaceQuery<R>- Specified by:
setMaxResultsin interfaceSelectionQuery<R>- Specified by:
setMaxResultsin interfaceSqmQueryImplementor<R>- Specified by:
setMaxResultsin interfaceTypedQuery<R>- Overrides:
setMaxResultsin classAbstractSelectionQuery<R>- Parameters:
maxResult- maximum number of results to retrieve- Returns:
- the same query instance
-
setFirstResult
Description copied from interface:SelectionQuerySet the first row position to return from the query results. Applied to the SQL query.- Specified by:
setFirstResultin interfaceQuery- Specified by:
setFirstResultin interfaceQuery<R>- Specified by:
setFirstResultin interfaceSelectionQuery<R>- Specified by:
setFirstResultin interfaceSqmQueryImplementor<R>- Specified by:
setFirstResultin interfaceTypedQuery<R>- Overrides:
setFirstResultin classAbstractSelectionQuery<R>- Parameters:
startPosition- position of the first result, numbered from 0- Returns:
- the same query instance
-
setHibernateFlushMode
Description copied from interface:CommonQueryContractSet the currentFlushModein effect for this query.- Specified by:
setHibernateFlushModein interfaceCommonQueryContract- Specified by:
setHibernateFlushModein interfaceMutationQuery- Specified by:
setHibernateFlushModein interfaceQuery<R>- Specified by:
setHibernateFlushModein interfaceSelectionQuery<R>- Specified by:
setHibernateFlushModein interfaceSqmQuery- Specified by:
setHibernateFlushModein interfaceSqmQueryImplementor<R>- Overrides:
setHibernateFlushModein classAbstractSelectionQuery<R>- See Also:
-
setFlushMode
Description copied from interface:CommonQueryContractSet theFlushModein to use for this query.- Specified by:
setFlushModein interfaceCommonQueryContract- Specified by:
setFlushModein interfaceMutationQuery- Specified by:
setFlushModein interfaceQuery- Specified by:
setFlushModein interfaceQuery<R>- Specified by:
setFlushModein interfaceSelectionQuery<R>- Specified by:
setFlushModein interfaceSqmQueryImplementor<R>- Specified by:
setFlushModein interfaceTypedQuery<R>- Overrides:
setFlushModein classAbstractSelectionQuery<R>- Parameters:
flushMode- flush mode- Returns:
- the same query instance
- See Also:
-
setLockMode
Description copied from class:AbstractSelectionQuerySpecify the root LockModeType for the query- Specified by:
setLockModein interfaceQuery- Specified by:
setLockModein interfaceQuery<R>- Specified by:
setLockModein interfaceSelectionQuery<R>- Specified by:
setLockModein interfaceSqmQueryImplementor<R>- Specified by:
setLockModein interfaceTypedQuery<R>- Overrides:
setLockModein classAbstractSelectionQuery<R>- Parameters:
lockMode- lock mode- Returns:
- the same query instance
- See Also:
-
getLockMode
Description copied from interface:SelectionQueryGet the rootLockModeTypefor the query- Specified by:
getLockModein interfaceQuery- Specified by:
getLockModein interfaceSelectionQuery<R>- Overrides:
getLockModein classAbstractSelectionQuery<R>- Returns:
- lock mode
- See Also:
-
getFlushMode
Description copied from interface:CommonQueryContractThe JPAFlushModeTypein effect for this query. By default, the query inherits theFlushModeof theSessionfrom which it originates.- Specified by:
getFlushModein interfaceCommonQueryContract- Specified by:
getFlushModein interfaceQuery- Overrides:
getFlushModein classAbstractSelectionQuery<R>- Returns:
- flush mode
- See Also:
-
setOrder
Description copied from interface:SelectionQueryIf the result type of this query is an entity class, add a rule for ordering the query results. -
setOrder
Description copied from interface:SelectionQueryIf the result type of this query is an entity class, add one or more rules for ordering the query results. -
setPage
Description copied from interface:SelectionQuerySet the page of results to return. -
collectHints
- Overrides:
collectHintsin classAbstractSelectionQuery<R>
-
setHint
Description copied from interface:CommonQueryContractSet a hint. The hints understood by Hibernate are enumerated byAvailableHints.- Specified by:
setHintin interfaceCommonQueryContract- Specified by:
setHintin interfaceMutationQuery- Specified by:
setHintin interfaceQuery- Specified by:
setHintin interfaceQuery<R>- Specified by:
setHintin interfaceSelectionQuery<R>- Specified by:
setHintin interfaceSqmQueryImplementor<R>- Specified by:
setHintin interfaceTypedQuery<R>- Overrides:
setHintin classAbstractSelectionQuery<R>- Parameters:
hintName- name of property or hintvalue- value for the property or hint- Returns:
- the same query instance
- See Also:
-
setEntityGraph
Description copied from interface:SelectionQueryApply anEntityGraphto the query.This is an alternative way to specify the associations which should be fetched as part of the initial query.
- Specified by:
setEntityGraphin interfaceQuery<R>- Specified by:
setEntityGraphin interfaceSelectionQuery<R>- Overrides:
setEntityGraphin classAbstractSelectionQuery<R>
-
enableFetchProfile
Description copied from interface:SelectionQueryEnable thefetch profilefor this query. If the requested fetch profile is already enabled, the call has no effect.This is an alternative way to specify the associations which should be fetched as part of the initial query.
- Specified by:
enableFetchProfilein interfaceQuery<R>- Specified by:
enableFetchProfilein interfaceSelectionQuery<R>- Overrides:
enableFetchProfilein classAbstractSelectionQuery<R>- Parameters:
profileName- the name of the fetch profile to be enabled- See Also:
-
disableFetchProfile
Description copied from interface:SelectionQueryDisable thefetch profilewith the given name in this session. If the requested fetch profile is not currently enabled, the call has no effect.- Specified by:
disableFetchProfilein interfaceQuery<R>- Specified by:
disableFetchProfilein interfaceSelectionQuery<R>- Overrides:
disableFetchProfilein classAbstractSelectionQuery<R>- Parameters:
profileName- the name of the fetch profile to be disabled- See Also:
-
applyLockTimeoutHint
- Overrides:
applyLockTimeoutHintin classAbstractCommonQueryContract
-
applyLockTimeoutHint
protected void applyLockTimeoutHint(int timeout) - Overrides:
applyLockTimeoutHintin classAbstractCommonQueryContract
-
applyHibernateLockMode
- Overrides:
applyHibernateLockModein classAbstractCommonQueryContract
-
applyLockModeType
- Overrides:
applyLockModeTypein classAbstractCommonQueryContract
-
applyAliasSpecificLockModeHint
- Overrides:
applyAliasSpecificLockModeHintin classAbstractCommonQueryContract
-
applyFollowOnLockingHint
- Overrides:
applyFollowOnLockingHintin classAbstractCommonQueryContract
-
applyGraph
Description copied from interface:QueryApply the given graph using the given semantic- Specified by:
applyGraphin interfaceQuery<R>- Specified by:
applyGraphin interfaceSqmQueryImplementor<R>- Parameters:
graph- The graph to apply.semantic- The semantic to use when applying the graph
-
toMemento
Description copied from interface:NameableQueryConvert the query into the memento- Specified by:
toMementoin interfaceNameableQuery- Specified by:
toMementoin interfaceSqmQueryImplementor<R>
-
unwrap
Description copied from interface:QueryReturn an object of the specified type to allow access to the provider-specific API. If the provider's query implementation does not support the specified class, thePersistenceExceptionis thrown. -
setComment
Description copied from interface:CommonQueryContractSet a comment for this query.- Specified by:
setCommentin interfaceCommonQueryContract- Specified by:
setCommentin interfaceMutationQuery- Specified by:
setCommentin interfaceQuery<R>- Specified by:
setCommentin interfaceSelectionQuery<R>- Specified by:
setCommentin interfaceSqmQueryImplementor<R>- Overrides:
setCommentin classAbstractSelectionQuery<R>- Parameters:
comment- The human-readable comment- Returns:
this, for method chaining- See Also:
-
setCacheMode
Description copied from interface:SelectionQuerySet the currentCacheModein effect for this query.- Specified by:
setCacheModein interfaceQuery<R>- Specified by:
setCacheModein interfaceSelectionQuery<R>- Specified by:
setCacheModein interfaceSqmQueryImplementor<R>- Overrides:
setCacheModein classAbstractSelectionQuery<R>- See Also:
-
setCacheRetrieveMode
- Specified by:
setCacheRetrieveModein interfaceQuery<R>- Specified by:
setCacheRetrieveModein interfaceSelectionQuery<R>- Overrides:
setCacheRetrieveModein classAbstractSelectionQuery<R>- See Also:
-
setCacheStoreMode
- Specified by:
setCacheStoreModein interfaceQuery<R>- 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 interfaceQuery<R>- Specified by:
setCacheablein interfaceSelectionQuery<R>- Specified by:
setCacheablein interfaceSqmQueryImplementor<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 interfaceQuery<R>- Specified by:
setCacheRegionin interfaceSelectionQuery<R>- Specified by:
setCacheRegionin interfaceSqmQueryImplementor<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:
-
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.
A value of zero indicates no timeout.
- Specified by:
setTimeoutin interfaceCommonQueryContract- Specified by:
setTimeoutin interfaceMutationQuery- Specified by:
setTimeoutin interfaceQuery<R>- Specified by:
setTimeoutin interfaceSelectionQuery<R>- Specified by:
setTimeoutin interfaceSqmQueryImplementor<R>- Overrides:
setTimeoutin classAbstractSelectionQuery<R>- Parameters:
timeout- the timeout in seconds- Returns:
this, for method chaining- See Also:
-
setFetchSize
Description copied from interface:SelectionQuerySets a JDBC fetch size hint for the query.- Specified by:
setFetchSizein interfaceQuery<R>- Specified by:
setFetchSizein interfaceSelectionQuery<R>- Specified by:
setFetchSizein interfaceSqmQueryImplementor<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 interfaceQuery<R>- Specified by:
setReadOnlyin interfaceSelectionQuery<R>- Specified by:
setReadOnlyin interfaceSqmQueryImplementor<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
-
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 interfaceMutationQuery- Specified by:
setPropertiesin interfaceQuery<R>- Specified by:
setPropertiesin interfaceQueryImplementor<R>- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Specified by:
setPropertiesin interfaceSqmQuery- Specified by:
setPropertiesin interfaceSqmQueryImplementor<R>- Overrides:
setPropertiesin classAbstractSelectionQuery<R>- Parameters:
bean- any JavaBean or POJO- 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 interfaceMutationQuery- Specified by:
setPropertiesin interfaceQuery<R>- Specified by:
setPropertiesin interfaceQueryImplementor<R>- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Specified by:
setPropertiesin interfaceSqmQuery- Specified by:
setPropertiesin interfaceSqmQueryImplementor<R>- Overrides:
setPropertiesin classAbstractSelectionQuery<R>- Parameters:
bean- aMapof names to arguments- Returns:
this, for method chaining
-
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 forms which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
name- parameter namevalue- parameter value- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenClassreference to attempt to infer theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(String, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to a named query parameter using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>
-
setParameter
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 interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<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 forms which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
position- positionvalue- parameter value- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(int, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- See Also:
-
setParameter
Description copied from interface:CommonQueryContractBind the given argument to an ordinal query parameter using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>
-
setParameter
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 interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<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 forms which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<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> SqmQueryImplementor<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 theBindableTypeto use. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameter(QueryParameter, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulljavaType- aBindableTyperepresenting the type of the parameter- Returns:
this, for method chaining- See Also:
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, BindableType<P> type) Description copied from interface:CommonQueryContractBind an argument to the query parameter represented by the givenQueryParameter, using the givenBindableType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulltype- aBindableTyperepresenting the type of the parameter- Returns:
this, for method chaining
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
parameter- parameter objectvalue- parameter value- Returns:
- the same query instance
- See Also:
-
setParameter
public SqmQueryImplementor<R> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
param- parameter objectvalue- parameter valuetemporalType- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
public SqmQueryImplementor<R> setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
param- parameter objectvalue- parameter valuetemporalType- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
name- parameter namevalue- parameter valuetemporalType- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
name- parameter namevalue- parameter valuetemporalType- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
position- positionvalue- parameter valuetemporalType- temporal type- Returns:
- the same query instance
- See Also:
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceMutationQuery- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceSqmQuery- Specified by:
setParameterin interfaceSqmQueryImplementor<R>- Specified by:
setParameterin interfaceTypedQuery<R>- Overrides:
setParameterin classAbstractSelectionQuery<R>- Parameters:
position- positionvalue- parameter valuetemporalType- temporal type- Returns:
- the same query instance
- 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 interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmQueryImplementor<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 theBindableTypeIf unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to a named query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<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 interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<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 theBindableTypeto use. If unable to determine an appropriateBindableType,CommonQueryContract.setParameterList(String, Collection)is used- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<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 givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<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 interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<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 theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to an ordinal query parameter using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<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 interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<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 theBindableType. If unable to infer an appropriateBindableType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<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 givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<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 interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<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 theBindableTypeto use. If unable to infer an appropriateBindableType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<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 interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<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 theBindableTypeto use. If unable to infer an appropriateBindableType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type) Description copied from interface:CommonQueryContractBind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theBindableType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceMutationQuery- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Specified by:
setParameterListin interfaceSqmQuery- Specified by:
setParameterListin interfaceSqmQueryImplementor<R>- Overrides:
setParameterListin classAbstractSelectionQuery<R>- Returns:
this, for method chaining
-
setOptionalId
- Specified by:
setOptionalIdin interfaceQueryImplementor<R>
-
setOptionalEntityName
- Specified by:
setOptionalEntityNamein interfaceQueryImplementor<R>
-
setOptionalObject
- Specified by:
setOptionalObjectin interfaceQueryImplementor<R>
-
max
-
first
-
hasLimit
-
needsDistinct
protected boolean needsDistinct(boolean containsCollectionFetches, boolean hasLimit, SqmSelectStatement<?> sqmStatement) -
hasAppliedGraph
-
errorOrLogForPaginationWithCollectionFetch
protected void errorOrLogForPaginationWithCollectionFetch() -
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) -
applyOptions
-
buildTupleMetadata
-
validateCriteriaQuery
-