Class SqmSelectionQueryImpl<R>
- java.lang.Object
-
- org.hibernate.query.spi.AbstractCommonQueryContract
-
- org.hibernate.query.spi.AbstractSelectionQuery<R>
-
- org.hibernate.query.sqm.internal.SqmSelectionQueryImpl<R>
-
- All Implemented Interfaces:
CommonQueryContract
,SelectionQuery<R>
,DomainQueryExecutionContext
,SqmQuery
,SqmInterpretationsKey.CacheabilityInfluencers
,SqmInterpretationsKey.InterpretationsKeySource
,SqmSelectionQuery<R>
public class SqmSelectionQueryImpl<R> extends AbstractSelectionQuery<R> implements SqmSelectionQuery<R>, SqmInterpretationsKey.InterpretationsKeySource
-
-
Field Summary
-
Fields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRING
-
-
Constructor Summary
Constructors Constructor Description SqmSelectionQueryImpl(String hql, HqlInterpretation hqlInterpretation, Class<R> expectedResultType, SharedSessionContractImplementor session)
SqmSelectionQueryImpl(NamedCriteriaQueryMementoImpl memento, Class<R> resultType, SharedSessionContractImplementor session)
SqmSelectionQueryImpl(NamedHqlQueryMementoImpl memento, Class<R> resultType, SharedSessionContractImplementor session)
SqmSelectionQueryImpl(SqmSelectStatement<R> criteria, Class<R> expectedResultType, SharedSessionContractImplementor session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
collectHints(Map<String,Object> hints)
protected List<R>
doList()
protected ScrollableResultsImplementor<R>
doScroll(ScrollMode scrollMode)
CacheMode
getCacheMode()
Obtain the CacheMode in effect for this query.String
getCacheRegion()
Obtain the name of the second level query cache region in which query results will be stored (if they are cached, see the discussion onSelectionQuery.isCacheable()
for more information).DomainParameterXref
getDomainParameterXref()
Integer
getFetchSize()
Obtain the JDBC fetch size hint in effect for this query.jakarta.persistence.FlushModeType
getFlushMode()
The JPAFlushModeType
in effect for this query.LoadQueryInfluencers
getLoadQueryInfluencers()
LockOptions
getLockOptions()
The LockOptions currently in effect for the queryParameterMetadataImplementor
getParameterMetadata()
QueryParameterBindings
getQueryParameterBindings()
The domain parameter bindingsString
getQueryString()
Class<R>
getResultType()
SqmSelectStatement
getSqmStatement()
protected boolean
hasMultiValuedParameterBindings()
Supplier<Boolean>
hasMultiValuedParameterBindingsChecker()
boolean
isCacheable()
Should the results of the query be stored in the second level cache?boolean
isReadOnly()
Should entities and proxies loaded by this Query be put in read-only mode? If the read-only/modifiable setting was not initialized, then the default read-only/modifiable setting for the persistence context is returned instead.protected void
prepareForExecution()
protected boolean
resolveJdbcParameterTypeIfNecessary()
SqmSelectionQuery<R>
setAliasSpecificLockMode(String alias, LockMode lockMode)
Specify a LockMode to apply to a specific alias defined in the querySqmSelectionQuery<R>
setCacheable(boolean cacheable)
Enable/disable second level query (result) caching for this query.SqmSelectionQuery<R>
setCacheMode(CacheMode cacheMode)
Set the current CacheMode in effect for this query.SqmSelectionQuery<R>
setCacheRegion(String regionName)
Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()
).SqmSelectionQuery<R>
setFetchSize(int fetchSize)
Sets a JDBC fetch size hint for the query.SqmSelectionQuery<R>
setFlushMode(jakarta.persistence.FlushModeType flushMode)
Set theFlushMode
in to use for this query.SqmSelectionQuery<R>
setFollowOnLocking(boolean enable)
Specifies whether follow-on locking should be applied?SqmSelectionQuery<R>
setHibernateFlushMode(FlushMode flushMode)
Set the currentFlushMode
in effect for this query.SqmSelectionQuery<R>
setHibernateLockMode(LockMode lockMode)
Specify the root LockMode for the querySqmSelectionQuery<R>
setLockMode(jakarta.persistence.LockModeType lockMode)
Specify the root LockModeType for the querySqmSelectionQuery<R>
setParameter(int position, Object value)
Bind the given argument to an ordinal query parameter.SqmSelectionQuery<R>
setParameter(int position, Instant value, jakarta.persistence.TemporalType temporalType)
Bind anInstant
to an ordinal query parameter using just the portion indicated by the givenTemporalType
.SqmSelectionQuery<R>
setParameter(int position, Calendar value, jakarta.persistence.TemporalType temporalType)
SqmSelectionQuery<R>
setParameter(int position, Date value, jakarta.persistence.TemporalType temporalType)
<P> SqmSelectionQuery<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> SqmSelectionQuery<R>
setParameter(int position, P value, BindableType<P> type)
Bind the given argument to an ordinal query parameter using the givenBindableType
.SqmSelectionQuery<R>
setParameter(jakarta.persistence.Parameter<Calendar> param, Calendar value, jakarta.persistence.TemporalType temporalType)
SqmSelectionQuery<R>
setParameter(jakarta.persistence.Parameter<Date> param, Date value, jakarta.persistence.TemporalType temporalType)
<P> SqmSelectionQuery<R>
setParameter(jakarta.persistence.Parameter<P> parameter, P value)
SqmSelectionQuery<R>
setParameter(String name, Object value)
Bind the given argument to a named query parameter.SqmSelectionQuery<R>
setParameter(String name, Instant value, jakarta.persistence.TemporalType temporalType)
Bind anInstant
to the named query parameter using just the portion indicated by the givenTemporalType
.SqmSelectionQuery<R>
setParameter(String name, Calendar value, jakarta.persistence.TemporalType temporalType)
SqmSelectionQuery<R>
setParameter(String name, Date value, jakarta.persistence.TemporalType temporalType)
<P> SqmSelectionQuery<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> SqmSelectionQuery<R>
setParameter(String name, P value, BindableType<P> type)
Bind the given argument to a named query parameter using the givenBindableType
.<P> SqmSelectionQuery<R>
setParameter(QueryParameter<P> parameter, P value)
Bind an argument to the query parameter represented by the givenQueryParameter
.<P> SqmSelectionQuery<R>
setParameter(QueryParameter<P> parameter, P value, 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> SqmSelectionQuery<R>
setParameter(QueryParameter<P> parameter, P value, BindableType<P> type)
Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.SqmSelectionQuery<R>
setParameterList(int position, Object[] values)
Bind multiple arguments to an ordinal query parameter.SqmSelectionQuery<R>
setParameterList(int position, Collection values)
Bind multiple arguments to an ordinal query parameter.<P> SqmSelectionQuery<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> SqmSelectionQuery<R>
setParameterList(int position, Collection<? extends P> values, BindableType<P> type)
Bind multiple arguments to an ordinal query parameter using the givenBindableType
.<P> SqmSelectionQuery<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> SqmSelectionQuery<R>
setParameterList(int position, P[] values, BindableType<P> type)
Bind multiple arguments to an ordinal query parameter using the givenBindableType
.SqmSelectionQuery<R>
setParameterList(String name, Object[] values)
Bind multiple arguments to a named query parameter.SqmSelectionQuery<R>
setParameterList(String name, Collection values)
Bind multiple arguments to a named query parameter.<P> SqmSelectionQuery<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> SqmSelectionQuery<R>
setParameterList(String name, Collection<? extends P> values, BindableType<P> type)
Bind multiple arguments to a named query parameter using the givenBindableType
.<P> SqmSelectionQuery<R>
setParameterList(String name, P[] values, Class<P> javaType)
Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theBindableType
to use.<P> SqmSelectionQuery<R>
setParameterList(String name, P[] values, BindableType<P> type)
Bind multiple arguments to a named query parameter using the givenBindableType
.<P> SqmSelectionQuery<R>
setParameterList(QueryParameter<P> parameter, Collection<? extends P> values)
Bind multiple arguments to the query parameter represented by the givenQueryParameter
.<P> SqmSelectionQuery<R>
setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, 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> SqmSelectionQuery<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> SqmSelectionQuery<R>
setParameterList(QueryParameter<P> parameter, P[] values)
Bind multiple arguments to the query parameter represented by the givenQueryParameter
.<P> SqmSelectionQuery<R>
setParameterList(QueryParameter<P> parameter, P[] values, 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> SqmSelectionQuery<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
.SqmSelectionQuery<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.SqmSelectionQuery<R>
setProperties(Map map)
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.SqmSelectionQuery<R>
setReadOnly(boolean readOnly)
Set the read-only/modifiable mode for entities and proxies loaded by this Query.SqmSelectionQuery<R>
setTimeout(int timeout)
Set the query timeout in seconds.-
Methods inherited from class org.hibernate.query.spi.AbstractSelectionQuery
afterQuery, applyOptions, applyOptions, beforeQuery, buildTupleMetadata, checkQueryReturnType, getCallback, getSessionFactory, getSingleResult, getSingleResultOrNull, hasAppliedGraph, hasLimit, list, requiresTxn, resetCallback, scroll, scroll, setFirstResult, setHint, setMaxResults, stream, uniqueElement, uniqueResult, uniqueResultOptional, verifyResultType, visitQueryReturnType
-
Methods inherited from class org.hibernate.query.spi.AbstractCommonQueryContract
applyAdditionalPossibleHints, applyAliasSpecificLockModeHint, applyCacheableHint, applyCacheModeHint, applyCacheRegionHint, applyCommentHint, applyEntityGraphHint, applyFetchSizeHint, applyFirstResult, applyFlushModeHint, applyFollowOnLockingHint, applyGraph, applyGraph, applyHibernateLockMode, applyHint, applyJpaCacheRetrieveModeHint, applyJpaCacheStoreModeHint, applyJpaFlushMode, applyLockModeHint, applyLockModeType, applyLockTimeoutHint, applyLockTimeoutHint, applyMaxResults, 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, setComment
-
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
getComment, getHibernateFlushMode, getTimeout, setComment
-
Methods inherited from interface org.hibernate.query.spi.DomainQueryExecutionContext
getQueryOptions, getSession
-
Methods inherited from interface org.hibernate.query.SelectionQuery
getFirstResult, getMaxResults, getResultList, getResultStream, getSingleResult, getSingleResultOrNull, list, scroll, scroll, setFirstResult, setHint, setMaxResults, stream, uniqueResult, uniqueResultOptional
-
Methods inherited from interface org.hibernate.query.sqm.internal.SqmInterpretationsKey.CacheabilityInfluencers
getQueryOptions
-
Methods inherited from interface org.hibernate.query.spi.SqmQuery
getQueryOptions
-
-
-
-
Constructor Detail
-
SqmSelectionQueryImpl
public SqmSelectionQueryImpl(String hql, HqlInterpretation hqlInterpretation, Class<R> expectedResultType, SharedSessionContractImplementor session)
-
SqmSelectionQueryImpl
public SqmSelectionQueryImpl(NamedHqlQueryMementoImpl memento, Class<R> resultType, SharedSessionContractImplementor session)
-
SqmSelectionQueryImpl
public SqmSelectionQueryImpl(NamedCriteriaQueryMementoImpl memento, Class<R> resultType, SharedSessionContractImplementor session)
-
SqmSelectionQueryImpl
public SqmSelectionQueryImpl(SqmSelectStatement<R> criteria, Class<R> expectedResultType, SharedSessionContractImplementor session)
-
-
Method Detail
-
getSqmStatement
public SqmSelectStatement getSqmStatement()
- Specified by:
getSqmStatement
in interfaceSqmQuery
-
getDomainParameterXref
public DomainParameterXref getDomainParameterXref()
-
getParameterMetadata
public ParameterMetadataImplementor getParameterMetadata()
- Specified by:
getParameterMetadata
in interfaceSqmQuery
- Specified by:
getParameterMetadata
in classAbstractCommonQueryContract
-
getQueryParameterBindings
public QueryParameterBindings getQueryParameterBindings()
Description copied from interface:DomainQueryExecutionContext
The domain parameter bindings- Specified by:
getQueryParameterBindings
in interfaceDomainQueryExecutionContext
- Specified by:
getQueryParameterBindings
in classAbstractCommonQueryContract
-
getQueryString
public String getQueryString()
- Specified by:
getQueryString
in interfaceSqmInterpretationsKey.CacheabilityInfluencers
- Specified by:
getQueryString
in interfaceSqmQuery
- Specified by:
getQueryString
in classAbstractSelectionQuery<R>
-
prepareForExecution
protected void prepareForExecution()
- Specified by:
prepareForExecution
in classAbstractSelectionQuery<R>
-
doList
protected List<R> doList()
- Specified by:
doList
in classAbstractSelectionQuery<R>
-
doScroll
protected ScrollableResultsImplementor<R> doScroll(ScrollMode scrollMode)
- Specified by:
doScroll
in classAbstractSelectionQuery<R>
-
getResultType
public Class<R> getResultType()
- Specified by:
getResultType
in interfaceSqmInterpretationsKey.InterpretationsKeySource
-
getLoadQueryInfluencers
public LoadQueryInfluencers getLoadQueryInfluencers()
- Specified by:
getLoadQueryInfluencers
in interfaceSqmInterpretationsKey.CacheabilityInfluencers
-
hasMultiValuedParameterBindingsChecker
public Supplier<Boolean> hasMultiValuedParameterBindingsChecker()
- Specified by:
hasMultiValuedParameterBindingsChecker
in interfaceSqmInterpretationsKey.CacheabilityInfluencers
-
hasMultiValuedParameterBindings
protected boolean hasMultiValuedParameterBindings()
-
resolveJdbcParameterTypeIfNecessary
protected boolean resolveJdbcParameterTypeIfNecessary()
- Specified by:
resolveJdbcParameterTypeIfNecessary
in classAbstractCommonQueryContract
-
getFlushMode
public jakarta.persistence.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
- Overrides:
getFlushMode
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.getHibernateFlushMode()
,Session.getHibernateFlushMode()
-
setFlushMode
public SqmSelectionQuery<R> setFlushMode(jakarta.persistence.FlushModeType flushMode)
Description copied from interface:CommonQueryContract
Set theFlushMode
in to use for this query.- Specified by:
setFlushMode
in interfaceCommonQueryContract
- Specified by:
setFlushMode
in interfaceSelectionQuery<R>
- Overrides:
setFlushMode
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.getHibernateFlushMode()
,Session.getHibernateFlushMode()
-
getLockOptions
public LockOptions getLockOptions()
Description copied from interface:SelectionQuery
The LockOptions currently in effect for the query- Specified by:
getLockOptions
in interfaceSelectionQuery<R>
- Overrides:
getLockOptions
in classAbstractSelectionQuery<R>
-
setLockMode
public SqmSelectionQuery<R> setLockMode(jakarta.persistence.LockModeType lockMode)
Specify the root LockModeType for the query- Specified by:
setLockMode
in interfaceSelectionQuery<R>
- Overrides:
setLockMode
in classAbstractSelectionQuery<R>
- See Also:
setHibernateLockMode(org.hibernate.LockMode)
-
setHibernateLockMode
public SqmSelectionQuery<R> setHibernateLockMode(LockMode lockMode)
Specify the root LockMode for the query- Specified by:
setHibernateLockMode
in interfaceSelectionQuery<R>
- Overrides:
setHibernateLockMode
in classAbstractSelectionQuery<R>
-
setAliasSpecificLockMode
public SqmSelectionQuery<R> setAliasSpecificLockMode(String alias, LockMode lockMode)
Specify a LockMode to apply to a specific alias defined in the query- Specified by:
setAliasSpecificLockMode
in interfaceSelectionQuery<R>
- Overrides:
setAliasSpecificLockMode
in classAbstractSelectionQuery<R>
-
setFollowOnLocking
public SqmSelectionQuery<R> setFollowOnLocking(boolean enable)
Specifies whether follow-on locking should be applied?- Specified by:
setFollowOnLocking
in interfaceSelectionQuery<R>
- Overrides:
setFollowOnLocking
in classAbstractSelectionQuery<R>
-
getFetchSize
public Integer getFetchSize()
Description copied from interface:SelectionQuery
Obtain the JDBC fetch size hint in effect for this query. This value is eventually passed along to the JDBC query viaStatement.setFetchSize(int)
. As defined b y JDBC, this value is a hint to the driver to indicate how many rows to fetch from the database when more rows are needed. NOTE : JDBC expressly defines this value as a hint. It may or may not have any effect on the actual query execution and ResultSet processing depending on the driver.- Specified by:
getFetchSize
in interfaceSelectionQuery<R>
- Overrides:
getFetchSize
in classAbstractSelectionQuery<R>
- Returns:
- The timeout in seconds
- See Also:
Statement.getFetchSize()
,Statement.setFetchSize(int)
-
setFetchSize
public SqmSelectionQuery<R> setFetchSize(int fetchSize)
Description copied from interface:SelectionQuery
Sets a JDBC fetch size hint for the query.- Specified by:
setFetchSize
in interfaceSelectionQuery<R>
- Specified by:
setFetchSize
in interfaceSqmSelectionQuery<R>
- Overrides:
setFetchSize
in classAbstractSelectionQuery<R>
- Parameters:
fetchSize
- the fetch size hint- Returns:
this
, for method chaining- See Also:
SelectionQuery.getFetchSize()
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:SelectionQuery
Should entities and proxies loaded by this Query be put in read-only mode? If the read-only/modifiable setting was not initialized, then the default read-only/modifiable setting for the persistence context is returned instead.- Specified by:
isReadOnly
in interfaceSelectionQuery<R>
- Overrides:
isReadOnly
in classAbstractSelectionQuery<R>
- Returns:
true
if the entities and proxies loaded by the query will be put in read-only mode;false
otherwise (they will be modifiable)- See Also:
SelectionQuery.setReadOnly(boolean)
,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.
-
setReadOnly
public SqmSelectionQuery<R> setReadOnly(boolean readOnly)
Description copied from interface:SelectionQuery
Set the read-only/modifiable mode for entities and proxies loaded by this Query. This setting overrides the default setting for the persistence context.- Specified by:
setReadOnly
in interfaceSelectionQuery<R>
- Specified by:
setReadOnly
in interfaceSqmSelectionQuery<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- See Also:
To set the default read-only/modifiable setting used for entities and proxies that are loaded into the session:
,PersistenceContext.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.
-
getCacheMode
public CacheMode getCacheMode()
Description copied from interface:SelectionQuery
Obtain the CacheMode in effect for this query. By default, the query inherits the CacheMode of the Session from which is originates. NOTE: The CacheMode here describes reading-from/writing-to the entity/collection caches as we process query results. For caching of the actual query results, seeSelectionQuery.isCacheable()
andSelectionQuery.getCacheRegion()
In order for this setting to have any affect, second-level caching would have to be enabled and the entities/collections in question configured for caching.- Specified by:
getCacheMode
in interfaceSelectionQuery<R>
- Overrides:
getCacheMode
in classAbstractSelectionQuery<R>
- See Also:
Session.getCacheMode()
-
setCacheMode
public SqmSelectionQuery<R> setCacheMode(CacheMode cacheMode)
Description copied from interface:SelectionQuery
Set the current CacheMode in effect for this query.- Specified by:
setCacheMode
in interfaceSelectionQuery<R>
- Specified by:
setCacheMode
in interfaceSqmSelectionQuery<R>
- Overrides:
setCacheMode
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.getCacheMode()
,Session.setCacheMode(org.hibernate.CacheMode)
-
isCacheable
public boolean isCacheable()
Description copied from interface:SelectionQuery
Should the results of the query be stored in the second level cache? This is different than second level caching of any returned entities and collections, which is controlled bySelectionQuery.getCacheMode()
. NOTE: the query being "eligible" for caching does not necessarily mean its results will be cached. Second level query caching still has to be enabled on theSessionFactory
for this to happen. Usually that is controlled by thehibernate.cache.use_query_cache
configuration setting.- Specified by:
isCacheable
in interfaceSelectionQuery<R>
- Overrides:
isCacheable
in classAbstractSelectionQuery<R>
- See Also:
AvailableSettings.USE_QUERY_CACHE
-
setCacheable
public SqmSelectionQuery<R> setCacheable(boolean cacheable)
Description copied from interface:SelectionQuery
Enable/disable second level query (result) caching for this query.- Specified by:
setCacheable
in interfaceSelectionQuery<R>
- Specified by:
setCacheable
in interfaceSqmSelectionQuery<R>
- Overrides:
setCacheable
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.isCacheable()
-
getCacheRegion
public String getCacheRegion()
Description copied from interface:SelectionQuery
Obtain the name of the second level query cache region in which query results will be stored (if they are cached, see the discussion onSelectionQuery.isCacheable()
for more information).null
indicates that the default region should be used.- Specified by:
getCacheRegion
in interfaceSelectionQuery<R>
- Overrides:
getCacheRegion
in classAbstractSelectionQuery<R>
-
setCacheRegion
public SqmSelectionQuery<R> setCacheRegion(String regionName)
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 interfaceSelectionQuery<R>
- Specified by:
setCacheRegion
in interfaceSqmSelectionQuery<R>
- Overrides:
setCacheRegion
in classAbstractSelectionQuery<R>
- See Also:
SelectionQuery.getCacheRegion()
-
collectHints
protected void collectHints(Map<String,Object> hints)
- Overrides:
collectHints
in classAbstractSelectionQuery<R>
-
setHibernateFlushMode
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setHibernateFlushMode
in interfaceSqmQuery
- Specified by:
setHibernateFlushMode
in interfaceSqmSelectionQuery<R>
- Overrides:
setHibernateFlushMode
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.getHibernateFlushMode()
,Session.getHibernateFlushMode()
-
setTimeout
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setTimeout
in interfaceSqmSelectionQuery<R>
- Overrides:
setTimeout
in classAbstractSelectionQuery<R>
- Parameters:
timeout
- the timeout in seconds- Returns:
this
, for method chaining- See Also:
CommonQueryContract.getTimeout()
-
setParameter
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.setParameter(String, Object, Class)
,CommonQueryContract.setParameter(String, Object, BindableType)
-
setParameter
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
BindableType.parameterType(Class)
,CommonQueryContract.setParameter(String, Object, BindableType)
-
setParameter
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
BindableType.parameterType(java.lang.Class<T>)
-
setParameter
public SqmSelectionQuery<R> setParameter(String name, Instant value, jakarta.persistence.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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
CommonQueryContract.setParameter(int, Object, Class)
,CommonQueryContract.setParameter(int, Object, BindableType)
-
setParameter
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
BindableType.parameterType(Class)
,CommonQueryContract.setParameter(int, Object, BindableType)
-
setParameter
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
BindableType.parameterType(java.lang.Class<T>)
-
setParameter
public SqmSelectionQuery<R> setParameter(int position, Instant value, jakarta.persistence.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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<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> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<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:
BindableType.parameterType(Class)
,CommonQueryContract.setParameter(QueryParameter, Object, BindableType)
-
setParameter
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<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> SqmSelectionQuery<R> setParameter(jakarta.persistence.Parameter<P> parameter, P value)
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(Parameter, Object)
-
setParameter
public SqmSelectionQuery<R> setParameter(jakarta.persistence.Parameter<Calendar> param, Calendar value, jakarta.persistence.TemporalType temporalType)
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(Parameter, Calendar, TemporalType)
-
setParameter
public SqmSelectionQuery<R> setParameter(jakarta.persistence.Parameter<Date> param, Date value, jakarta.persistence.TemporalType temporalType)
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(Parameter, Date, TemporalType)
-
setParameter
public SqmSelectionQuery<R> setParameter(String name, Calendar value, jakarta.persistence.TemporalType temporalType)
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(String, Calendar, TemporalType)
-
setParameter
public SqmSelectionQuery<R> setParameter(String name, Date value, jakarta.persistence.TemporalType temporalType)
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(String, Date, TemporalType)
-
setParameter
public SqmSelectionQuery<R> setParameter(int position, Calendar value, jakarta.persistence.TemporalType temporalType)
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(int, Calendar, TemporalType)
-
setParameter
public SqmSelectionQuery<R> setParameter(int position, Date value, jakarta.persistence.TemporalType temporalType)
- Specified by:
setParameter
in interfaceCommonQueryContract
- Specified by:
setParameter
in interfaceSelectionQuery<R>
- Specified by:
setParameter
in interfaceSqmQuery
- Specified by:
setParameter
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
Query.setParameter(int, Date, TemporalType)
-
setParameterList
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<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> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
BindableType.parameterType(Class)
,CommonQueryContract.setParameterList(java.lang.String, java.util.Collection, BindableType)
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
BindableType.parameterType(Class)
,CommonQueryContract.setParameterList(java.lang.String, Object[], BindableType)
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaType)
Description copied from interface: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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
BindableType.parameterType(Class)
,CommonQueryContract.setParameterList(int, Collection, BindableType)
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
BindableType.parameterType(Class)
,CommonQueryContract.setParameterList(int, Object[], BindableType)
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the parameter mementovalues
- a collection of arguments- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType)
Description copied from interface: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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
BindableType.parameterType(Class)
,CommonQueryContract.setParameterList(QueryParameter, java.util.Collection, BindableType)
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the parameter mementovalues
- a collection of arguments- Returns:
this
, for method chaining
-
setParameterList
public <P> SqmSelectionQuery<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType)
Description copied from interface: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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
BindableType.parameterType(Class)
,CommonQueryContract.setParameterList(QueryParameter, Object[], BindableType)
-
setParameterList
public <P> SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setParameterList
in interfaceSqmQuery
- Specified by:
setParameterList
in interfaceSqmSelectionQuery<R>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setProperties
public SqmSelectionQuery<R> setProperties(Map map)
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 interfaceSelectionQuery<R>
- Specified by:
setProperties
in interfaceSqmQuery
- Specified by:
setProperties
in interfaceSqmSelectionQuery<R>
- Overrides:
setProperties
in classAbstractSelectionQuery<R>
- Parameters:
map
- aMap
of names to arguments- Returns:
this
, for method chaining
-
setProperties
public SqmSelectionQuery<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 interfaceSelectionQuery<R>
- Specified by:
setProperties
in interfaceSqmQuery
- Specified by:
setProperties
in interfaceSqmSelectionQuery<R>
- Overrides:
setProperties
in classAbstractSelectionQuery<R>
- Parameters:
bean
- any JavaBean or POJO- Returns:
this
, for method chaining
-
-