Class QuerySqmImpl<R>
- java.lang.Object
-
- org.hibernate.query.spi.AbstractCommonQueryContract
-
- org.hibernate.query.spi.AbstractSelectionQuery<R>
-
- org.hibernate.query.sqm.internal.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
public class QuerySqmImpl<R> extends AbstractSelectionQuery<R> implements SqmQueryImplementor<R>, SqmInterpretationsKey.InterpretationsKeySource, DomainQueryExecutionContext
Query
implementation based on an SQM
-
-
Field Summary
-
Fields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRING
-
-
Constructor Summary
Constructors Constructor Description QuerySqmImpl(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SqmQueryImplementor<R>
addQueryHint(String hint)
Add a database query hint to the SQL query.protected void
applyAliasSpecificLockModeHint(String hintName, Object value)
protected void
applyFollowOnLockingHint(Boolean followOnLocking)
SqmQueryImplementor<R>
applyGraph(RootGraph graph, GraphSemantic semantic)
Apply the given graph using the given semanticprotected void
applyHibernateLockMode(LockMode value)
protected void
applyLockModeType(LockModeType value)
protected void
applyLockTimeoutHint(int timeout)
protected void
applyLockTimeoutHint(Integer timeout)
protected void
applyOptions(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>
buildSelectQueryPlan()
protected TupleMetadata
buildTupleMetadata(SqmStatement<?> statement, Class<R> resultType)
protected void
collectHints(Map<String,Object> hints)
Query<R>
disableFetchProfile(String profileName)
Disable thefetch profile
with the given name in this session.protected int
doExecuteUpdate()
protected List<R>
doList()
protected ScrollableResultsImplementor<R>
doScroll(ScrollMode scrollMode)
Query<R>
enableFetchProfile(String profileName)
Enable thefetch profile
for this query.protected void
errorOrLogForPaginationWithCollectionFetch()
int
executeUpdate()
Execute an insert, update, or delete statement, and return the number of affected entities.protected DomainQueryExecutionContext
executionContextForDoList(boolean containsCollectionFetches, boolean hasLimit, boolean needsDistinct)
protected int
first(boolean hasLimit, SqmSelectStatement<?> sqmStatement)
DomainParameterXref
getDomainParameterXref()
Class<R>
getExpectedResultType()
FlushModeType
getFlushMode()
The JPAFlushModeType
in effect for this query.KeyedResultList<R>
getKeyedResultList(KeyedPage<R> keyedPage)
Execute the query and return the results for the given page, using key-based pagination.LoadQueryInfluencers
getLoadQueryInfluencers()
LockModeType
getLockMode()
Get the rootLockModeType
for the queryQueryParameterBindings
getParameterBindings()
ParameterMetadataImplementor
getParameterMetadata()
Access to information about query parameters.QueryParameterBindings
getQueryParameterBindings()
The domain parameter bindingsString
getQueryString()
The query as a string, ornull
in the case of a criteria query.long
getResultCount()
Determine the size of the query result list that would be returned by callingSelectionQuery.getResultList()
with no offset or limit applied to the query.Class<R>
getResultType()
SqmStatement<R>
getSqmStatement()
TupleMetadata
getTupleMetadata()
protected static boolean
hasAppliedGraph(MutableQueryOptions queryOptions)
protected boolean
hasIdentifierAssigned(SqmInsertStatement<?> sqmInsert, EntityPersister entityDescriptor)
protected static boolean
hasLimit(SqmSelectStatement<?> sqm, MutableQueryOptions queryOptions)
protected boolean
hasMultiValuedParameterBindings()
Supplier<Boolean>
hasMultiValuedParameterBindingsChecker()
protected static <T> HqlInterpretation<T>
interpretation(NamedHqlQueryMementoImpl memento, Class<T> expectedResultType, SharedSessionContractImplementor session)
boolean
isQueryPlanCacheable()
Should the query plan of the query be stored in the query plan cache?protected boolean
isSimpleValuesInsert(SqmInsertStatement<?> sqmInsert, EntityPersister entityDescriptor)
protected int
max(boolean hasLimit, SqmSelectStatement<?> sqmStatement, List<R> list)
protected boolean
needsDistinct(boolean containsCollectionFetches, boolean hasLimit, SqmSelectStatement<?> sqmStatement)
protected void
prepareForExecution()
protected boolean
resolveJdbcParameterTypeIfNecessary()
SqmQueryImplementor<R>
setCacheable(boolean cacheable)
Enable/disable second level query (result) caching for this query.SqmQueryImplementor<R>
setCacheMode(CacheMode cacheMode)
Set the currentCacheMode
in effect for this query.SqmQueryImplementor<R>
setCacheRegion(String cacheRegion)
Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()
).SqmQueryImplementor<R>
setCacheRetrieveMode(CacheRetrieveMode cacheRetrieveMode)
SqmQueryImplementor<R>
setCacheStoreMode(CacheStoreMode cacheStoreMode)
SqmQueryImplementor<R>
setComment(String comment)
Set a comment for this query.Query<R>
setEntityGraph(EntityGraph<R> graph, GraphSemantic semantic)
Apply anEntityGraph
to the query.SqmQueryImplementor<R>
setFetchSize(int fetchSize)
Sets a JDBC fetch size hint for the query.SqmQueryImplementor<R>
setFirstResult(int startPosition)
Set the first row position to return from the query results.SqmQueryImplementor<R>
setFlushMode(FlushModeType flushMode)
Set theFlushMode
in to use for this query.SqmQueryImplementor<R>
setHibernateFlushMode(FlushMode flushMode)
Set the currentFlushMode
in effect for this query.SqmQueryImplementor<R>
setHint(String hintName, Object value)
Set a hint.SqmQueryImplementor<R>
setLockMode(LockModeType lockMode)
Specify the root LockModeType for the querySqmQueryImplementor<R>
setLockMode(String alias, LockMode lockMode)
Specify aLockMode
to apply to a specific alias defined in the querySqmQueryImplementor<R>
setLockOptions(LockOptions lockOptions)
Apply the given lock options to this query.SqmQueryImplementor<R>
setMaxResults(int maxResult)
Set the max number of rows requested for the query results.void
setOptionalEntityName(String entityName)
void
setOptionalId(Serializable id)
void
setOptionalObject(Object optionalObject)
Query<R>
setOrder(List<Order<? super R>> orders)
If the result type of this query is an entity class, add one or more rules for ordering the query results.Query<R>
setOrder(Order<? super R> order)
If the result type of this query is an entity class, add a rule for ordering the query results.Query<R>
setPage(Page page)
Set the page of results to return.SqmQueryImplementor<R>
setParameter(int position, Object value)
Bind the given argument to an ordinal query parameter.SqmQueryImplementor<R>
setParameter(int position, Instant value, TemporalType temporalType)
Bind anInstant
to an ordinal query parameter using just the portion indicated by the givenTemporalType
.SqmQueryImplementor<R>
setParameter(int position, Calendar value, TemporalType temporalType)
Query
overrideSqmQueryImplementor<R>
setParameter(int position, Date value, TemporalType temporalType)
Query
override<P> SqmQueryImplementor<R>
setParameter(int position, P value, Class<P> javaType)
Bind the given argument to an ordinal query parameter using the givenClass
reference 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
.SqmQueryImplementor<R>
setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType)
Query
overrideSqmQueryImplementor<R>
setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
Query
override<P> SqmQueryImplementor<R>
setParameter(Parameter<P> parameter, P value)
Query
overrideSqmQueryImplementor<R>
setParameter(String name, Object value)
Bind the given argument to a named query parameter.SqmQueryImplementor<R>
setParameter(String name, Instant value, TemporalType temporalType)
Bind anInstant
to the named query parameter using just the portion indicated by the givenTemporalType
.SqmQueryImplementor<R>
setParameter(String name, Calendar value, TemporalType temporalType)
Query
overrideSqmQueryImplementor<R>
setParameter(String name, Date value, TemporalType temporalType)
Query
override<P> SqmQueryImplementor<R>
setParameter(String name, P value, Class<P> javaType)
Bind the given argument to a named query parameter using the givenClass
reference 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 givenClass
reference to attempt to infer theBindableType
to 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
.SqmQueryImplementor<R>
setParameterList(int position, Object[] values)
Bind multiple arguments to an ordinal query parameter.SqmQueryImplementor<R>
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 givenClass
reference 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 givenClass
reference 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
.SqmQueryImplementor<R>
setParameterList(String name, Object[] values)
Bind multiple arguments to a named query parameter.SqmQueryImplementor<R>
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 givenClass
reference to attempt to infer theBindableType
If 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 theBindableType
to 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 givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to 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 givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to 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
.SqmQueryImplementor<R>
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.SqmQueryImplementor<R>
setProperties(Map bean)
Bind the values of the givenMap
to named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.SqmQueryImplementor<R>
setQueryPlanCacheable(boolean queryPlanCacheable)
Enable/disable query plan caching for this query.SqmQueryImplementor<R>
setReadOnly(boolean readOnly)
Set the read-only/modifiable mode for entities and proxies loaded by thisQuery
.SqmQueryImplementor<R>
setResultListTransformer(ResultListTransformer<R> transformer)
Set aResultListTransformer
.protected void
setSqmStatement(SqmSelectStatement<R> sqm)
SqmQueryImplementor<R>
setTimeout(int timeout)
Set the query timeout in seconds.<T> SqmQueryImplementor<T>
setTupleTransformer(TupleTransformer<T> transformer)
Set aTupleTransformer
.NamedQueryMemento
toMemento(String name)
Convert the query into the mementostatic QueryOptions
uniqueSemanticQueryOptions(QueryOptions originalOptions)
<T> T
unwrap(Class<T> cls)
protected static void
validateCriteriaQuery(SqmQueryPart<?> queryPart)
protected void
verifySelect()
protected void
verifyUpdate()
-
Methods 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, uniqueResultOptional
-
Methods 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, putIfNotNull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.CommonQueryContract
getHibernateFlushMode, getTimeout
-
Methods inherited from interface org.hibernate.query.spi.DomainQueryExecutionContext
getCallback, getQueryOptions, getSession, hasCallbackActions
-
Methods inherited from interface jakarta.persistence.Query
getFirstResult, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound
-
Methods inherited from interface org.hibernate.query.Query
getComment, getLockOptions, getQueryOptions, getResultList, getResultStream, getSingleResult, list, stream, uniqueResult, uniqueResultOptional
-
Methods inherited from interface org.hibernate.query.spi.QueryImplementor
getSession, scroll, scroll
-
Methods inherited from interface org.hibernate.query.SelectionQuery
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getFirstResult, getHibernateLockMode, getKeyedResultList, getMaxResults, getSingleResultOrNull, isCacheable, isReadOnly, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockMode
-
Methods inherited from interface org.hibernate.query.sqm.internal.SqmInterpretationsKey.CacheabilityInfluencers
getQueryOptions
-
Methods inherited from interface org.hibernate.query.spi.SqmQuery
getQueryOptions
-
Methods inherited from interface org.hibernate.query.hql.spi.SqmQueryImplementor
applyFetchGraph, applyLoadGraph, setResultTransformer
-
-
-
-
Constructor Detail
-
QuerySqmImpl
public QuerySqmImpl(NamedHqlQueryMementoImpl memento, Class<R> expectedResultType, SharedSessionContractImplementor session)
Creates a Query instance from a named HQL memento
-
QuerySqmImpl
public QuerySqmImpl(NamedCriteriaQueryMementoImpl memento, Class<R> resultType, SharedSessionContractImplementor session)
-
QuerySqmImpl
public QuerySqmImpl(String hql, HqlInterpretation<R> hqlInterpretation, Class<R> resultType, SharedSessionContractImplementor session)
Form used for HQL queries
-
QuerySqmImpl
public QuerySqmImpl(SqmStatement<R> criteria, Class<R> expectedResultType, SharedSessionContractImplementor producer)
Form used for criteria queries
-
-
Method Detail
-
getTupleMetadata
public TupleMetadata getTupleMetadata()
-
getQueryString
public String getQueryString()
Description copied from interface:Query
The query as a string, ornull
in the case of a criteria query.- Specified by:
getQueryString
in interfaceQuery<R>
- Specified by:
getQueryString
in interfaceSqmInterpretationsKey.CacheabilityInfluencers
- Specified by:
getQueryString
in interfaceSqmQuery
- Specified by:
getQueryString
in classAbstractSelectionQuery<R>
-
getSqmStatement
public SqmStatement<R> getSqmStatement()
- Specified by:
getSqmStatement
in interfaceSqmInterpretationsKey.CacheabilityInfluencers
- Specified by:
getSqmStatement
in interfaceSqmQuery
- Specified by:
getSqmStatement
in interfaceSqmQueryImplementor<R>
-
setSqmStatement
protected void setSqmStatement(SqmSelectStatement<R> sqm)
-
getDomainParameterXref
public DomainParameterXref getDomainParameterXref()
-
getParameterMetadata
public ParameterMetadataImplementor getParameterMetadata()
Description copied from interface:Query
Access to information about query parameters.- Specified by:
getParameterMetadata
in interfaceQuery<R>
- Specified by:
getParameterMetadata
in interfaceSqmQuery
- Specified by:
getParameterMetadata
in interfaceSqmQueryImplementor<R>
- Specified by:
getParameterMetadata
in classAbstractCommonQueryContract
- Returns:
- information about query parameters.
-
getQueryParameterBindings
public QueryParameterBindings getQueryParameterBindings()
Description copied from interface:DomainQueryExecutionContext
The domain parameter bindings- Specified by:
getQueryParameterBindings
in interfaceDomainQueryExecutionContext
- Specified by:
getQueryParameterBindings
in classAbstractCommonQueryContract
-
getParameterBindings
public QueryParameterBindings getParameterBindings()
- Specified by:
getParameterBindings
in interfaceQueryImplementor<R>
-
getResultType
public Class<R> getResultType()
- Specified by:
getResultType
in interfaceDomainQueryExecutionContext
- Specified by:
getResultType
in interfaceSqmInterpretationsKey.InterpretationsKeySource
-
getLoadQueryInfluencers
public LoadQueryInfluencers getLoadQueryInfluencers()
- Specified by:
getLoadQueryInfluencers
in interfaceSqmInterpretationsKey.CacheabilityInfluencers
-
resolveJdbcParameterTypeIfNecessary
protected boolean resolveJdbcParameterTypeIfNecessary()
- Specified by:
resolveJdbcParameterTypeIfNecessary
in classAbstractCommonQueryContract
-
hasMultiValuedParameterBindingsChecker
public Supplier<Boolean> hasMultiValuedParameterBindingsChecker()
- Specified by:
hasMultiValuedParameterBindingsChecker
in interfaceSqmInterpretationsKey.CacheabilityInfluencers
-
hasMultiValuedParameterBindings
protected boolean hasMultiValuedParameterBindings()
-
prepareForExecution
protected void prepareForExecution()
- Specified by:
prepareForExecution
in classAbstractSelectionQuery<R>
-
verifySelect
protected void verifySelect()
-
getResultCount
public long getResultCount()
Description copied from interface:SelectionQuery
Determine 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:
getResultCount
in interfaceSelectionQuery<R>
- Returns:
- the size of the list that would be returned
-
doList
protected List<R> doList()
- Specified by:
doList
in classAbstractSelectionQuery<R>
-
executionContextForDoList
protected DomainQueryExecutionContext executionContextForDoList(boolean containsCollectionFetches, boolean hasLimit, boolean needsDistinct)
-
uniqueSemanticQueryOptions
public static QueryOptions uniqueSemanticQueryOptions(QueryOptions originalOptions)
-
doScroll
protected ScrollableResultsImplementor<R> doScroll(ScrollMode scrollMode)
- Specified by:
doScroll
in classAbstractSelectionQuery<R>
-
isQueryPlanCacheable
public boolean isQueryPlanCacheable()
Description copied from interface:SelectionQuery
Should the query plan of the query be stored in the query plan cache?- Specified by:
isQueryPlanCacheable
in interfaceSelectionQuery<R>
- Specified by:
isQueryPlanCacheable
in interfaceSqmInterpretationsKey.CacheabilityInfluencers
- Overrides:
isQueryPlanCacheable
in classAbstractSelectionQuery<R>
-
executeUpdate
public int executeUpdate()
Description copied from interface:Query
Execute an insert, update, or delete statement, and return the number of affected entities.For use with instances of
MutationQuery
created usingQueryProducer.createMutationQuery(String)
,QueryProducer.createNamedMutationQuery(String)
,QueryProducer.createNativeMutationQuery(String)
,QueryProducer.createQuery(jakarta.persistence.criteria.CriteriaUpdate)
, orQueryProducer.createQuery(jakarta.persistence.criteria.CriteriaDelete)
.- Specified by:
executeUpdate
in interfaceMutationQuery
- Specified by:
executeUpdate
in interfaceQuery
- Specified by:
executeUpdate
in interfaceQuery<R>
- Returns:
- the number of affected entity instances (may differ from the number of affected rows)
- See Also:
QueryProducer.createMutationQuery(java.lang.String)
,QueryProducer.createMutationQuery(String)
,QueryProducer.createNamedMutationQuery(String)
,QueryProducer.createNativeMutationQuery(String)
,Query.executeUpdate()
,QueryProducer.createMutationQuery(java.lang.String)
-
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
public SqmQueryImplementor<R> addQueryHint(String hint)
Description copied from interface:Query
Add a database query hint to the SQL query.A database hint is a completely different concept to a JPA hint specified using
QueryHint
orQuery.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:
addQueryHint
in interfaceQuery<R>
- Specified by:
addQueryHint
in interfaceSqmQueryImplementor<R>
- Parameters:
hint
- The database specific query hint to add.
-
setLockOptions
public SqmQueryImplementor<R> setLockOptions(LockOptions lockOptions)
Description copied from interface:Query
Apply 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:
setLockOptions
in interfaceQuery<R>
- Specified by:
setLockOptions
in interfaceSqmQueryImplementor<R>
- Parameters:
lockOptions
- The lock options to apply to the query.- Returns:
this
, for method chaining- See Also:
Query.getLockOptions()
-
setLockMode
public SqmQueryImplementor<R> setLockMode(String alias, LockMode lockMode)
Description copied from interface:SelectionQuery
Specify aLockMode
to apply to a specific alias defined in the query- Specified by:
setLockMode
in interfaceQuery<R>
- Specified by:
setLockMode
in interfaceSelectionQuery<R>
- Specified by:
setLockMode
in interfaceSqmQueryImplementor<R>
- Overrides:
setLockMode
in classAbstractSelectionQuery<R>
- Parameters:
alias
- A query aliaslockMode
- The lock mode to apply- Returns:
this
, for method chaining- See Also:
Query.getLockOptions()
-
setTupleTransformer
public <T> SqmQueryImplementor<T> setTupleTransformer(TupleTransformer<T> transformer)
Description copied from interface:Query
Set aTupleTransformer
.- Specified by:
setTupleTransformer
in interfaceQuery<R>
- Specified by:
setTupleTransformer
in interfaceQueryImplementor<R>
- Specified by:
setTupleTransformer
in interfaceSqmQueryImplementor<R>
-
setResultListTransformer
public SqmQueryImplementor<R> setResultListTransformer(ResultListTransformer<R> transformer)
Description copied from interface:Query
Set aResultListTransformer
.- Specified by:
setResultListTransformer
in interfaceQuery<R>
- Specified by:
setResultListTransformer
in interfaceQueryImplementor<R>
- Specified by:
setResultListTransformer
in interfaceSqmQueryImplementor<R>
-
setMaxResults
public SqmQueryImplementor<R> setMaxResults(int maxResult)
Description copied from interface:SelectionQuery
Set the max number of rows requested for the query results. Applied to the SQL query- Specified by:
setMaxResults
in interfaceQuery
- Specified by:
setMaxResults
in interfaceQuery<R>
- Specified by:
setMaxResults
in interfaceSelectionQuery<R>
- Specified by:
setMaxResults
in interfaceSqmQueryImplementor<R>
- Specified by:
setMaxResults
in interfaceTypedQuery<R>
- Overrides:
setMaxResults
in classAbstractSelectionQuery<R>
-
setFirstResult
public SqmQueryImplementor<R> setFirstResult(int startPosition)
Description copied from interface:SelectionQuery
Set the first row position to return from the query results. Applied to the SQL query.- Specified by:
setFirstResult
in interfaceQuery
- Specified by:
setFirstResult
in interfaceQuery<R>
- Specified by:
setFirstResult
in interfaceSelectionQuery<R>
- Specified by:
setFirstResult
in interfaceSqmQueryImplementor<R>
- Specified by:
setFirstResult
in interfaceTypedQuery<R>
- Overrides:
setFirstResult
in classAbstractSelectionQuery<R>
-
setHibernateFlushMode
public SqmQueryImplementor<R> setHibernateFlushMode(FlushMode flushMode)
Description copied from interface:CommonQueryContract
Set the currentFlushMode
in effect for this query.- Specified by:
setHibernateFlushMode
in interfaceCommonQueryContract
- Specified by:
setHibernateFlushMode
in interfaceMutationQuery
- Specified by:
setHibernateFlushMode
in interfaceQuery<R>
- Specified by:
setHibernateFlushMode
in interfaceSelectionQuery<R>
- Specified by:
setHibernateFlushMode
in interfaceSqmQuery
- Specified by:
setHibernateFlushMode
in interfaceSqmQueryImplementor<R>
- Overrides:
setHibernateFlushMode
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.getHibernateFlushMode()
,Session.getHibernateFlushMode()
-
setFlushMode
public SqmQueryImplementor<R> setFlushMode(FlushModeType flushMode)
Description copied from interface:CommonQueryContract
Set theFlushMode
in to use for this query.- Specified by:
setFlushMode
in interfaceCommonQueryContract
- Specified by:
setFlushMode
in interfaceMutationQuery
- Specified by:
setFlushMode
in interfaceQuery
- Specified by:
setFlushMode
in interfaceQuery<R>
- Specified by:
setFlushMode
in interfaceSelectionQuery<R>
- Specified by:
setFlushMode
in interfaceSqmQueryImplementor<R>
- Specified by:
setFlushMode
in interfaceTypedQuery<R>
- Overrides:
setFlushMode
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.getHibernateFlushMode()
,Session.getHibernateFlushMode()
-
setLockMode
public SqmQueryImplementor<R> setLockMode(LockModeType lockMode)
Description copied from class:AbstractSelectionQuery
Specify the root LockModeType for the query- Specified by:
setLockMode
in interfaceQuery
- Specified by:
setLockMode
in interfaceQuery<R>
- Specified by:
setLockMode
in interfaceSelectionQuery<R>
- Specified by:
setLockMode
in interfaceSqmQueryImplementor<R>
- Specified by:
setLockMode
in interfaceTypedQuery<R>
- Overrides:
setLockMode
in classAbstractSelectionQuery<R>
- See Also:
AbstractSelectionQuery.setHibernateLockMode(org.hibernate.LockMode)
-
getLockMode
public LockModeType getLockMode()
Description copied from interface:SelectionQuery
Get the rootLockModeType
for the query- Specified by:
getLockMode
in interfaceQuery
- Specified by:
getLockMode
in interfaceSelectionQuery<R>
- Overrides:
getLockMode
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.getHibernateLockMode()
-
getFlushMode
public FlushModeType getFlushMode()
Description copied from interface:CommonQueryContract
The JPAFlushModeType
in effect for this query. By default, the query inherits theFlushMode
of theSession
from which it originates.- Specified by:
getFlushMode
in interfaceCommonQueryContract
- Specified by:
getFlushMode
in interfaceQuery
- Overrides:
getFlushMode
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.getHibernateFlushMode()
,Session.getHibernateFlushMode()
-
setOrder
public Query<R> setOrder(Order<? super R> order)
Description copied from interface:SelectionQuery
If the result type of this query is an entity class, add a rule for ordering the query results.
-
setOrder
public Query<R> setOrder(List<Order<? super R>> orders)
Description copied from interface:SelectionQuery
If the result type of this query is an entity class, add one or more rules for ordering the query results.
-
setPage
public Query<R> setPage(Page page)
Description copied from interface:SelectionQuery
Set the page of results to return.
-
collectHints
protected void collectHints(Map<String,Object> hints)
- Overrides:
collectHints
in classAbstractSelectionQuery<R>
-
setHint
public SqmQueryImplementor<R> setHint(String hintName, Object value)
Description copied from interface:CommonQueryContract
Set a hint. The hints understood by Hibernate are enumerated byAvailableHints
.- Specified by:
setHint
in interfaceCommonQueryContract
- Specified by:
setHint
in interfaceMutationQuery
- Specified by:
setHint
in interfaceQuery
- Specified by:
setHint
in interfaceQuery<R>
- Specified by:
setHint
in interfaceSelectionQuery<R>
- Specified by:
setHint
in interfaceSqmQueryImplementor<R>
- Specified by:
setHint
in interfaceTypedQuery<R>
- Overrides:
setHint
in classAbstractSelectionQuery<R>
- See Also:
HibernateHints
,SpecHints
-
setEntityGraph
public Query<R> setEntityGraph(EntityGraph<R> graph, GraphSemantic semantic)
Description copied from interface:SelectionQuery
Apply anEntityGraph
to the query.This is an alternative way to specify the associations which should be fetched as part of the initial query.
- Specified by:
setEntityGraph
in interfaceQuery<R>
- Specified by:
setEntityGraph
in interfaceSelectionQuery<R>
- Overrides:
setEntityGraph
in classAbstractSelectionQuery<R>
-
enableFetchProfile
public Query<R> enableFetchProfile(String profileName)
Description copied from interface:SelectionQuery
Enable thefetch profile
for 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:
enableFetchProfile
in interfaceQuery<R>
- Specified by:
enableFetchProfile
in interfaceSelectionQuery<R>
- Overrides:
enableFetchProfile
in classAbstractSelectionQuery<R>
- Parameters:
profileName
- the name of the fetch profile to be enabled- See Also:
FetchProfile
-
disableFetchProfile
public Query<R> disableFetchProfile(String profileName)
Description copied from interface:SelectionQuery
Disable thefetch profile
with the given name in this session. If the requested fetch profile is not currently enabled, the call has no effect.- Specified by:
disableFetchProfile
in interfaceQuery<R>
- Specified by:
disableFetchProfile
in interfaceSelectionQuery<R>
- Overrides:
disableFetchProfile
in classAbstractSelectionQuery<R>
- Parameters:
profileName
- the name of the fetch profile to be disabled- See Also:
FetchProfile
-
applyLockTimeoutHint
protected void applyLockTimeoutHint(Integer timeout)
- Overrides:
applyLockTimeoutHint
in classAbstractCommonQueryContract
-
applyLockTimeoutHint
protected void applyLockTimeoutHint(int timeout)
- Overrides:
applyLockTimeoutHint
in classAbstractCommonQueryContract
-
applyHibernateLockMode
protected void applyHibernateLockMode(LockMode value)
- Overrides:
applyHibernateLockMode
in classAbstractCommonQueryContract
-
applyLockModeType
protected void applyLockModeType(LockModeType value)
- Overrides:
applyLockModeType
in classAbstractCommonQueryContract
-
applyAliasSpecificLockModeHint
protected void applyAliasSpecificLockModeHint(String hintName, Object value)
- Overrides:
applyAliasSpecificLockModeHint
in classAbstractCommonQueryContract
-
applyFollowOnLockingHint
protected void applyFollowOnLockingHint(Boolean followOnLocking)
- Overrides:
applyFollowOnLockingHint
in classAbstractCommonQueryContract
-
applyGraph
public SqmQueryImplementor<R> applyGraph(RootGraph graph, GraphSemantic semantic)
Description copied from interface:Query
Apply the given graph using the given semantic- Specified by:
applyGraph
in interfaceQuery<R>
- Specified by:
applyGraph
in interfaceSqmQueryImplementor<R>
- Parameters:
graph
- The graph to apply.semantic
- The semantic to use when applying the graph
-
toMemento
public NamedQueryMemento toMemento(String name)
Description copied from interface:NameableQuery
Convert the query into the memento- Specified by:
toMemento
in interfaceNameableQuery
- Specified by:
toMemento
in interfaceSqmQueryImplementor<R>
-
setComment
public SqmQueryImplementor<R> setComment(String comment)
Description copied from interface:CommonQueryContract
Set a comment for this query.- Specified by:
setComment
in interfaceCommonQueryContract
- Specified by:
setComment
in interfaceMutationQuery
- Specified by:
setComment
in interfaceQuery<R>
- Specified by:
setComment
in interfaceSelectionQuery<R>
- Specified by:
setComment
in interfaceSqmQueryImplementor<R>
- Overrides:
setComment
in classAbstractSelectionQuery<R>
- Parameters:
comment
- The human-readable comment- Returns:
this
, for method chaining- See Also:
Query.setComment(String)
-
setCacheMode
public SqmQueryImplementor<R> setCacheMode(CacheMode cacheMode)
Description copied from interface:SelectionQuery
Set the currentCacheMode
in effect for this query.- Specified by:
setCacheMode
in interfaceQuery<R>
- Specified by:
setCacheMode
in interfaceSelectionQuery<R>
- Specified by:
setCacheMode
in interfaceSqmQueryImplementor<R>
- Overrides:
setCacheMode
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.getCacheMode()
,Session.setCacheMode(CacheMode)
-
setCacheRetrieveMode
public SqmQueryImplementor<R> setCacheRetrieveMode(CacheRetrieveMode cacheRetrieveMode)
- Specified by:
setCacheRetrieveMode
in interfaceQuery<R>
- Specified by:
setCacheRetrieveMode
in interfaceSelectionQuery<R>
- Overrides:
setCacheRetrieveMode
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.setCacheMode(CacheMode)
-
setCacheStoreMode
public SqmQueryImplementor<R> setCacheStoreMode(CacheStoreMode cacheStoreMode)
- Specified by:
setCacheStoreMode
in interfaceQuery<R>
- Specified by:
setCacheStoreMode
in interfaceSelectionQuery<R>
- Overrides:
setCacheStoreMode
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.setCacheMode(CacheMode)
-
setCacheable
public SqmQueryImplementor<R> setCacheable(boolean cacheable)
Description copied from interface:SelectionQuery
Enable/disable second level query (result) caching for this query.- Specified by:
setCacheable
in interfaceQuery<R>
- Specified by:
setCacheable
in interfaceSelectionQuery<R>
- Specified by:
setCacheable
in interfaceSqmQueryImplementor<R>
- Overrides:
setCacheable
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.isCacheable()
-
setCacheRegion
public SqmQueryImplementor<R> setCacheRegion(String cacheRegion)
Description copied from interface:SelectionQuery
Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()
).null
indicates to use the default region.- Specified by:
setCacheRegion
in interfaceQuery<R>
- Specified by:
setCacheRegion
in interfaceSelectionQuery<R>
- Specified by:
setCacheRegion
in interfaceSqmQueryImplementor<R>
- Overrides:
setCacheRegion
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.getCacheRegion()
-
setQueryPlanCacheable
public SqmQueryImplementor<R> setQueryPlanCacheable(boolean queryPlanCacheable)
Description copied from interface:SelectionQuery
Enable/disable query plan caching for this query.- Specified by:
setQueryPlanCacheable
in interfaceSelectionQuery<R>
- Overrides:
setQueryPlanCacheable
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.isQueryPlanCacheable()
-
setTimeout
public SqmQueryImplementor<R> setTimeout(int timeout)
Description copied from interface:CommonQueryContract
Set 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:
setTimeout
in interfaceCommonQueryContract
- Specified by:
setTimeout
in interfaceMutationQuery
- Specified by:
setTimeout
in interfaceQuery<R>
- Specified by:
setTimeout
in interfaceSelectionQuery<R>
- Specified by:
setTimeout
in interfaceSqmQueryImplementor<R>
- Overrides:
setTimeout
in classAbstractSelectionQuery<R>
- Parameters:
timeout
- the timeout in seconds- Returns:
this
, for method chaining- See Also:
CommonQueryContract.getTimeout()
-
setFetchSize
public SqmQueryImplementor<R> setFetchSize(int fetchSize)
Description copied from interface:SelectionQuery
Sets a JDBC fetch size hint for the query.- Specified by:
setFetchSize
in interfaceQuery<R>
- Specified by:
setFetchSize
in interfaceSelectionQuery<R>
- Specified by:
setFetchSize
in interfaceSqmQueryImplementor<R>
- Overrides:
setFetchSize
in classAbstractSelectionQuery<R>
- Parameters:
fetchSize
- the fetch size hint- Returns:
this
, for method chaining- See Also:
SelectionQuery.getFetchSize()
-
setReadOnly
public SqmQueryImplementor<R> setReadOnly(boolean readOnly)
Description copied from interface:SelectionQuery
Set 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:
setReadOnly
in interfaceQuery<R>
- Specified by:
setReadOnly
in interfaceSelectionQuery<R>
- Specified by:
setReadOnly
in interfaceSqmQueryImplementor<R>
- Overrides:
setReadOnly
in classAbstractSelectionQuery<R>
- Parameters:
readOnly
-true
indicates that entities and proxies loaded by the query are to be put in read-only mode;false
indicates that entities and proxies loaded by the query will be put in modifiable mode- Returns:
this
, for method chaining
-
setProperties
public SqmQueryImplementor<R> setProperties(Object bean)
Description copied from interface:CommonQueryContract
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.- Specified by:
setProperties
in interfaceCommonQueryContract
- Specified by:
setProperties
in interfaceMutationQuery
- Specified by:
setProperties
in interfaceQuery<R>
- Specified by:
setProperties
in interfaceQueryImplementor<R>
- Specified by:
setProperties
in interfaceSelectionQuery<R>
- Specified by:
setProperties
in interfaceSqmQuery
- Specified by:
setProperties
in interfaceSqmQueryImplementor<R>
- Overrides:
setProperties
in classAbstractSelectionQuery<R>
- Parameters:
bean
- any JavaBean or POJO- Returns:
this
, for method chaining
-
setProperties
public SqmQueryImplementor<R> setProperties(Map bean)
Description copied from interface:CommonQueryContract
Bind the values of the givenMap
to named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.- Specified by:
setProperties
in interfaceCommonQueryContract
- Specified by:
setProperties
in interfaceMutationQuery
- Specified by:
setProperties
in interfaceQuery<R>
- Specified by:
setProperties
in interfaceQueryImplementor<R>
- Specified by:
setProperties
in interfaceSelectionQuery<R>
- Specified by:
setProperties
in interfaceSqmQuery
- Specified by:
setProperties
in interfaceSqmQueryImplementor<R>
- Overrides:
setProperties
in classAbstractSelectionQuery<R>
- Parameters:
bean
- aMap
of names to arguments- Returns:
this
, for method chaining
-
setParameter
public SqmQueryImplementor<R> setParameter(String name, Object value)
Description copied from interface:CommonQueryContract
Bind 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:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.setParameter(String, Object, Class)
,CommonQueryContract.setParameter(String, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(String name, P value, Class<P> javaType)
Description copied from interface:CommonQueryContract
Bind the given argument to a named query parameter using the givenClass
reference to attempt to infer theBindableType
. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameter(String, Object)
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.setParameter(String, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(String name, P value, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind the given argument to a named query parameter using the givenBindableType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
public SqmQueryImplementor<R> setParameter(String name, Instant value, TemporalType temporalType)
Description copied from interface:CommonQueryContract
Bind anInstant
to the named query parameter using just the portion indicated by the givenTemporalType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
public SqmQueryImplementor<R> setParameter(int position, Object value)
Description copied from interface:CommonQueryContract
Bind 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:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.setParameter(int, Object, Class)
,CommonQueryContract.setParameter(int, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(int position, P value, Class<P> javaType)
Description copied from interface:CommonQueryContract
Bind the given argument to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameter(int, Object)
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.setParameter(int, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(int position, P value, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind the given argument to an ordinal query parameter using the givenBindableType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
public SqmQueryImplementor<R> setParameter(int position, Instant value, TemporalType temporalType)
Description copied from interface:CommonQueryContract
Bind anInstant
to an ordinal query parameter using just the portion indicated by the givenTemporalType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value)
Description copied from interface:CommonQueryContract
Bind 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:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the query parameter mementovalue
- the argument, which might be null- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameter(QueryParameter, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, Class<P> javaType)
Description copied from interface:CommonQueryContract
Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenClass
reference to attempt to infer theBindableType
to use. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameter(QueryParameter, Object)
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the query parameter mementovalue
- the argument, which might be nulljavaType
- aBindableType
representing the type of the parameter- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameter(QueryParameter, Object, BindableType)
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the query parameter mementovalue
- the argument, which might be nulltype
- aBindableType
representing the type of the parameter- Returns:
this
, for method chaining
-
setParameter
public <P> SqmQueryImplementor<R> setParameter(Parameter<P> parameter, P value)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(Parameter, Object)
-
setParameter
public SqmQueryImplementor<R> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(Parameter, Calendar, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(Parameter, Date, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(String name, Calendar value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(String, Calendar, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(String name, Date value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(String, Date, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(int position, Calendar value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(int, Calendar, TemporalType)
-
setParameter
public SqmQueryImplementor<R> setParameter(int position, Date value, TemporalType temporalType)
Description copied from interface:Query
Query
override- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceMutationQuery
- Specified by:
setParameter
in interfaceQuery
- Specified by:
setParameter
in interfaceQuery<R>
- Specified by:
setParameter
in interfaceQueryImplementor<R>
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmQueryImplementor<R>
- Specified by:
setParameter
in interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(int, Date, TemporalType)
-
setParameterList
public SqmQueryImplementor<R> setParameterList(String name, Collection values)
Description copied from interface:CommonQueryContract
Bind 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:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaType)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter using the givenClass
reference to attempt to infer theBindableType
If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public SqmQueryImplementor<R> setParameterList(String name, Object[] values)
Description copied from interface:CommonQueryContract
Bind 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:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, P[] values, Class<P> javaType)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theBindableType
to use. If unable to determine an appropriateBindableType
,CommonQueryContract.setParameterList(String, Collection)
is used- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(java.lang.String, Object[], BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(String name, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to a named query parameter using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public SqmQueryImplementor<R> setParameterList(int position, Collection values)
Description copied from interface:CommonQueryContract
Bind 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:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in 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:CommonQueryContract
Bind multiple arguments to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(int, Collection, BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public SqmQueryImplementor<R> setParameterList(int position, Object[] values)
Description copied from interface:CommonQueryContract
Bind 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:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(int position, P[] values, Class<P> javaType)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
. If unable to infer an appropriateBindableType
, fall back toCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(int, Object[], BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(int position, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to an ordinal query parameter using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values)
Description copied from interface:CommonQueryContract
Bind 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:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in 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:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to use. If unable to infer an appropriateBindableType
, fall back to usingCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(QueryParameter, java.util.Collection, BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values)
Description copied from interface:CommonQueryContract
Bind 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
QueryParameter
and the type of the first given argument.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in 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:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to use. If unable to infer an appropriateBindableType
, fall back to usingCommonQueryContract.setParameterList(String, Collection)
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
CommonQueryContract.setParameterList(QueryParameter, Object[], BindableType)
-
setParameterList
public <P> SqmQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type)
Description copied from interface:CommonQueryContract
Bind multiple arguments to the query parameter represented by the givenQueryParameter
, using the given theBindableType
.- Specified by:
setParameterList
in interfaceCommonQueryContract
- Specified by:
setParameterList
in interfaceMutationQuery
- Specified by:
setParameterList
in interfaceQuery<R>
- Specified by:
setParameterList
in interfaceQueryImplementor<R>
- Specified by:
setParameterList
in interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmQueryImplementor<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setOptionalId
public void setOptionalId(Serializable id)
- Specified by:
setOptionalId
in interfaceQueryImplementor<R>
-
setOptionalEntityName
public void setOptionalEntityName(String entityName)
- Specified by:
setOptionalEntityName
in interfaceQueryImplementor<R>
-
setOptionalObject
public void setOptionalObject(Object optionalObject)
- Specified by:
setOptionalObject
in interfaceQueryImplementor<R>
-
max
protected int max(boolean hasLimit, SqmSelectStatement<?> sqmStatement, List<R> list)
-
first
protected int first(boolean hasLimit, SqmSelectStatement<?> sqmStatement)
-
hasLimit
protected static boolean hasLimit(SqmSelectStatement<?> sqm, MutableQueryOptions queryOptions)
-
needsDistinct
protected boolean needsDistinct(boolean containsCollectionFetches, boolean hasLimit, SqmSelectStatement<?> sqmStatement)
-
hasAppliedGraph
protected static boolean hasAppliedGraph(MutableQueryOptions queryOptions)
-
errorOrLogForPaginationWithCollectionFetch
protected void errorOrLogForPaginationWithCollectionFetch()
-
getKeyedResultList
public KeyedResultList<R> getKeyedResultList(KeyedPage<R> keyedPage)
Description copied from interface:SelectionQuery
Execute 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:
KeyedPage
,KeyedResultList
-
buildSelectQueryPlan
protected SelectQueryPlan<R> buildSelectQueryPlan()
-
buildConcreteQueryPlan
protected SelectQueryPlan<R> buildConcreteQueryPlan(SqmSelectStatement<R> concreteSqmStatement)
-
buildConcreteQueryPlan
protected <T> ConcreteSqmSelectQueryPlan<T> buildConcreteQueryPlan(SqmSelectStatement<T> concreteSqmStatement, Class<T> expectedResultType, TupleMetadata tupleMetadata, QueryOptions queryOptions)
-
applyOptions
protected void applyOptions(NamedSqmQueryMemento memento)
-
buildTupleMetadata
protected TupleMetadata buildTupleMetadata(SqmStatement<?> statement, Class<R> resultType)
-
validateCriteriaQuery
protected static void validateCriteriaQuery(SqmQueryPart<?> queryPart)
-
interpretation
protected static <T> HqlInterpretation<T> interpretation(NamedHqlQueryMementoImpl memento, Class<T> expectedResultType, SharedSessionContractImplementor session)
-
-