Class AbstractQuery<R>
- All Implemented Interfaces:
Query
,TypedQuery<R>
,CommonQueryContract
,MutationQuery
,Query<R>
,SelectionQuery<R>
,DomainQueryExecutionContext
,QueryImplementor<R>
- Direct Known Subclasses:
NativeQueryImpl
,ProcedureCallImpl
-
Field Summary
FieldsFields inherited from class org.hibernate.query.spi.AbstractSelectionQuery
CRITERIA_HQL_STRING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddQueryHint
(String hint) Add a database query hint to the SQL query.protected void
applyOptions
(NamedQueryMemento memento) protected void
collectHints
(Map<String, Object> hints) disableFetchProfile
(String profileName) Disable thefetch profile
with the given name in this session.protected abstract int
enableFetchProfile
(String profileName) Enable thefetch profile
for this query.int
Execute an insert, update, or delete statement, and return the number of affected entities.Get the comment that has been set for this query, if any.int
The first row position to return from the query results.The JPAFlushModeType
in effect for this query.getKeyedResultList
(KeyedPage<R> keyedPage) Execute the query and return the results for the given page, using key-based pagination.Get the rootLockModeType
for the queryTheLockOptions
currently in effect for the queryint
The max number of rows requested for the query resultsGet the execution options for thisQuery
.boolean
Should the results of the query be stored in the second level cache?protected void
protected boolean
setCacheable
(boolean cacheable) Enable/disable second level query (result) caching for this query.setCacheMode
(CacheMode cacheMode) Set the currentCacheMode
in effect for this query.setCacheRegion
(String cacheRegion) Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()
).setCacheRetrieveMode
(CacheRetrieveMode cacheRetrieveMode) setCacheStoreMode
(CacheStoreMode cacheStoreMode) setComment
(String comment) Set a comment for this query.setEntityGraph
(EntityGraph<R> graph, GraphSemantic semantic) Apply anEntityGraph
to the query.setFetchSize
(int fetchSize) Sets a JDBC fetch size hint for the query.setFirstResult
(int startPosition) Set the first row position to return from the query results.setFlushMode
(FlushModeType flushModeType) Set theFlushMode
in to use for this query.setHibernateFlushMode
(FlushMode flushMode) Set the currentFlushMode
in effect for this query.Set a hint.setLockMode
(LockModeType lockModeType) Specify the root LockModeType for the querysetLockMode
(String alias, LockMode lockMode) Specify aLockMode
to apply to a specific alias defined in the querysetLockOptions
(LockOptions lockOptions) Apply the given lock options to this query.setMaxResults
(int maxResult) Set the max number of rows requested for the query results.void
setOptionalEntityName
(String entityName) void
void
setOptionalObject
(Object optionalObject) If the result type of this query is an entity class, add one or more rules for ordering the query results.If the result type of this query is an entity class, add a rule for ordering the query results.setParameter
(int position, Object value) Bind the given argument to an ordinal query parameter.setParameter
(int position, Instant value, TemporalType temporalType) Bind anInstant
to an ordinal query parameter using just the portion indicated by the givenTemporalType
.setParameter
(int position, Calendar value, TemporalType temporalType) Query
overridesetParameter
(int position, Date value, TemporalType temporalType) Query
override<P> QueryImplementor<R>
setParameter
(int position, P value, Class<P> javaTypeClass) Bind the given argument to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
.<P> QueryImplementor<R>
setParameter
(int position, P value, BindableType<P> type) Bind the given argument to an ordinal query parameter using the givenBindableType
.setParameter
(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Query
overridesetParameter
(Parameter<Date> param, Date value, TemporalType temporalType) Query
override<P> QueryImplementor<R>
setParameter
(Parameter<P> parameter, P value) Query
overridesetParameter
(String name, Object value) Bind the given argument to a named query parameter.setParameter
(String name, Instant value, TemporalType temporalType) Bind anInstant
to the named query parameter using just the portion indicated by the givenTemporalType
.setParameter
(String name, Calendar value, TemporalType temporalType) Query
overridesetParameter
(String name, Date value, TemporalType temporalType) Query
override<P> QueryImplementor<R>
setParameter
(String name, P value, Class<P> javaTypeClass) Bind the given argument to a named query parameter using the givenClass
reference to attempt to infer theBindableType
.<P> QueryImplementor<R>
setParameter
(String name, P value, BindableType<P> type) Bind the given argument to a named query parameter using the givenBindableType
.<P> QueryImplementor<R>
setParameter
(QueryParameter<P> parameter, P value) Bind an argument to the query parameter represented by the givenQueryParameter
.<P> QueryImplementor<R>
setParameter
(QueryParameter<P> parameter, P value, Class<P> javaTypeClass) Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenClass
reference to attempt to infer theBindableType
to use.<P> QueryImplementor<R>
setParameter
(QueryParameter<P> parameter, P value, BindableType<P> type) Bind an argument to the query parameter represented by the givenQueryParameter
, using the givenBindableType
.setParameterList
(int position, Object[] values) Bind multiple arguments to an ordinal query parameter.setParameterList
(int position, Collection values) Bind multiple arguments to an ordinal query parameter.<P> QueryImplementor<R>
setParameterList
(int position, Collection<? extends P> values, Class<P> javaTypeClass) Bind multiple arguments to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
.<P> QueryImplementor<R>
setParameterList
(int position, Collection<? extends P> values, BindableType<P> type) Bind multiple arguments to an ordinal query parameter using the givenBindableType
.<P> QueryImplementor<R>
setParameterList
(int position, P[] values, Class<P> javaTypeClass) Bind multiple arguments to an ordinal query parameter using the givenClass
reference to attempt to infer theBindableType
.<P> QueryImplementor<R>
setParameterList
(int position, P[] values, BindableType<P> type) Bind multiple arguments to an ordinal query parameter using the givenBindableType
.setParameterList
(String name, Object[] values) Bind multiple arguments to a named query parameter.setParameterList
(String name, Collection values) Bind multiple arguments to a named query parameter.<P> QueryImplementor<R>
setParameterList
(String name, Collection<? extends P> values, Class<P> javaTypeClass) 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> QueryImplementor<R>
setParameterList
(String name, Collection<? extends P> values, BindableType<P> type) Bind multiple arguments to a named query parameter using the givenBindableType
.<P> QueryImplementor<R>
setParameterList
(String name, P[] values, Class<P> javaTypeClass) Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theBindableType
to use.<P> QueryImplementor<R>
setParameterList
(String name, P[] values, BindableType<P> type) Bind multiple arguments to a named query parameter using the givenBindableType
.<P> QueryImplementor<R>
setParameterList
(QueryParameter<P> parameter, Collection<? extends P> values) Bind multiple arguments to the query parameter represented by the givenQueryParameter
.<P> QueryImplementor<R>
setParameterList
(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaTypeClass) Bind multiple arguments to the query parameter represented by the givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to use.<P> QueryImplementor<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> QueryImplementor<R>
setParameterList
(QueryParameter<P> parameter, P[] values) Bind multiple arguments to the query parameter represented by the givenQueryParameter
.<P> QueryImplementor<R>
setParameterList
(QueryParameter<P> parameter, P[] values, Class<P> javaTypeClass) Bind multiple arguments to the query parameter represented by the givenQueryParameter
using the givenClass
reference to attempt to infer theBindableType
to use.<P> QueryImplementor<R>
setParameterList
(QueryParameter<P> parameter, P[] values, BindableType<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter
, using the given theBindableType
.setProperties
(Object bean) Bind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using heuristics.setProperties
(Map 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.setQueryPlanCacheable
(boolean queryPlanCacheable) Enable/disable query plan caching for this query.setReadOnly
(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by thisQuery
.setResultListTransformer
(ResultListTransformer<R> transformer) Set aResultListTransformer
.setTimeout
(int timeout) Set the query timeout in seconds.<T> QueryImplementor<T>
setTupleTransformer
(TupleTransformer<T> transformer) Set aTupleTransformer
.Methods inherited from class org.hibernate.query.spi.AbstractSelectionQuery
afterQuery, afterQuery, afterQueryHandlingFetchProfiles, beforeQuery, beforeQueryHandlingFetchProfiles, doList, doScroll, getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getCallback, getFetchSize, getHibernateLockMode, getQueryString, getResultStream, getSessionFactory, getSingleResult, getSingleResultOrNull, hasCallbackActions, isQueryPlanCacheable, isReadOnly, list, requiresTxn, resetCallback, scroll, scroll, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockMode, stream, uniqueElement, uniqueResult, uniqueResultOptional
Methods inherited from class org.hibernate.query.spi.AbstractCommonQueryContract
applyAdditionalPossibleHints, applyAliasSpecificLockModeHint, applyCacheableHint, applyCacheModeHint, applyCacheRegionHint, applyCommentHint, applyDatabaseHint, applyEntityGraphHint, applyFetchSizeHint, applyFirstResult, applyFlushModeHint, applyFollowOnLockingHint, applyGraph, applyGraph, applyHibernateLockMode, applyHint, applyJpaCacheRetrieveModeHint, applyJpaCacheStoreModeHint, applyJpaFlushMode, applyLockModeHint, applyLockModeType, applyLockTimeoutHint, applyLockTimeoutHint, applyMaxResults, applyQueryPlanCacheableHint, applyResultListTransformer, applySelectionHint, applySynchronizeSpacesHint, applyTimeoutHint, applyTupleTransformer, determineType, getHibernateFlushMode, getHints, getIntegerLiteral, getJpaFlushMode, getMaxRows, getParameter, getParameter, getParameter, getParameter, getParameterMetadata, getParameterValue, getParameterValue, getParameterValue, getQueryParameterBindings, 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
getQueryParameterBindings, getResultType, getSession
Methods inherited from interface jakarta.persistence.Query
getHints, getParameter, getParameter, getParameter, getParameter, getParameterValue, getParameterValue, getParameterValue, isBound, unwrap
Methods inherited from interface org.hibernate.query.Query
applyFetchGraph, applyGraph, applyLoadGraph, getParameterMetadata, getQueryString, getResultList, getResultStream, getSingleResult, list, setPage, stream, uniqueResult, uniqueResultOptional
Methods inherited from interface org.hibernate.query.spi.QueryImplementor
getParameterBindings, getSession, scroll, scroll, setResultTransformer
Methods inherited from interface org.hibernate.query.SelectionQuery
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getHibernateLockMode, getResultCount, getSingleResultOrNull, isQueryPlanCacheable, isReadOnly, setAliasSpecificLockMode, setFollowOnLocking, setHibernateLockMode
-
Field Details
-
log
-
-
Constructor Details
-
Method Details
-
applyOptions
- Overrides:
applyOptions
in classAbstractSelectionQuery<R>
-
setHint
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 interfaceTypedQuery<R>
- Overrides:
setHint
in classAbstractSelectionQuery<R>
- See Also:
-
setEntityGraph
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
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:
-
disableFetchProfile
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:
-
getQueryOptions
Description copied from interface:Query
Get the execution options for thisQuery
. Many of the setters of this object update the state of the returnedQueryOptions
. This is useful because it gives access to s primitive value in its (nullable) wrapper form, rather than the primitive form as required by JPA. This allows us to distinguish whether a value has been explicitly set by the client.- Specified by:
getQueryOptions
in interfaceDomainQueryExecutionContext
- Specified by:
getQueryOptions
in interfaceQuery<R>
- Overrides:
getQueryOptions
in classAbstractCommonQueryContract
- Returns:
- Return the encapsulation of this query's options.
-
getMaxResults
public int getMaxResults()Description copied from interface:SelectionQuery
The max number of rows requested for the query results- Specified by:
getMaxResults
in interfaceQuery
- Specified by:
getMaxResults
in interfaceSelectionQuery<R>
- Overrides:
getMaxResults
in classAbstractCommonQueryContract
-
setMaxResults
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 interfaceTypedQuery<R>
- Overrides:
setMaxResults
in classAbstractSelectionQuery<R>
-
getFirstResult
public int getFirstResult()Description copied from interface:SelectionQuery
The first row position to return from the query results. Applied to the SQL query.- Specified by:
getFirstResult
in interfaceQuery
- Specified by:
getFirstResult
in interfaceSelectionQuery<R>
- Overrides:
getFirstResult
in classAbstractCommonQueryContract
-
setFirstResult
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 interfaceTypedQuery<R>
- Overrides:
setFirstResult
in classAbstractSelectionQuery<R>
-
setTupleTransformer
Description copied from interface:Query
Set aTupleTransformer
.- Specified by:
setTupleTransformer
in interfaceQuery<R>
- Specified by:
setTupleTransformer
in interfaceQueryImplementor<R>
-
setResultListTransformer
Description copied from interface:Query
Set aResultListTransformer
.- Specified by:
setResultListTransformer
in interfaceQuery<R>
- Specified by:
setResultListTransformer
in interfaceQueryImplementor<R>
-
setHibernateFlushMode
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>
- Overrides:
setHibernateFlushMode
in classAbstractSelectionQuery<R>
- See Also:
-
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:
-
setFlushMode
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 interfaceTypedQuery<R>
- Overrides:
setFlushMode
in classAbstractSelectionQuery<R>
- See Also:
-
setCacheMode
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>
- Overrides:
setCacheMode
in classAbstractSelectionQuery<R>
- See Also:
-
setCacheRetrieveMode
- Specified by:
setCacheRetrieveMode
in interfaceQuery<R>
- Specified by:
setCacheRetrieveMode
in interfaceSelectionQuery<R>
- Overrides:
setCacheRetrieveMode
in classAbstractSelectionQuery<R>
- See Also:
-
setCacheStoreMode
- Specified by:
setCacheStoreMode
in interfaceQuery<R>
- Specified by:
setCacheStoreMode
in interfaceSelectionQuery<R>
- Overrides:
setCacheStoreMode
in classAbstractSelectionQuery<R>
- See Also:
-
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 to second level caching of any returned entities and collections, which is controlled by
SelectionQuery.getCacheMode()
.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 the
SessionFactory
for this to happen. Usually that is controlled by the configuration setting "hibernate.cache.use_query_cache".- Specified by:
isCacheable
in interfaceSelectionQuery<R>
- Overrides:
isCacheable
in classAbstractSelectionQuery<R>
-
setCacheable
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>
- Overrides:
setCacheable
in classAbstractSelectionQuery<R>
- See Also:
-
setCacheRegion
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>
- Overrides:
setCacheRegion
in classAbstractSelectionQuery<R>
- See Also:
-
setQueryPlanCacheable
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:
-
setTimeout
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>
- Overrides:
setTimeout
in classAbstractSelectionQuery<R>
- Parameters:
timeout
- the timeout in seconds- Returns:
this
, for method chaining- See Also:
-
setFetchSize
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>
- Overrides:
setFetchSize
in classAbstractSelectionQuery<R>
- Parameters:
fetchSize
- the fetch size hint- Returns:
this
, for method chaining- See Also:
-
setReadOnly
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>
- 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
-
getLockOptions
Description copied from interface:SelectionQuery
TheLockOptions
currently in effect for the query- Specified by:
getLockOptions
in interfaceQuery<R>
- Specified by:
getLockOptions
in interfaceSelectionQuery<R>
- Overrides:
getLockOptions
in classAbstractSelectionQuery<R>
- Returns:
- The
LockOptions
currently in effect - See Also:
-
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:
-
setLockOptions
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>
- Parameters:
lockOptions
- The lock options to apply to the query.- Returns:
this
, for method chaining- See Also:
-
setLockMode
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>
- Overrides:
setLockMode
in classAbstractSelectionQuery<R>
- Parameters:
alias
- A query aliaslockMode
- The lock mode to apply- Returns:
this
, for method chaining- See Also:
-
setLockMode
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 interfaceTypedQuery<R>
- Overrides:
setLockMode
in classAbstractSelectionQuery<R>
- See Also:
-
setOrder
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. -
setOrder
Description copied from interface:SelectionQuery
If the result type of this query is an entity class, add a rule for ordering the query results. -
getComment
Description copied from interface:CommonQueryContract
Get the comment that has been set for this query, if any.- Specified by:
getComment
in interfaceCommonQueryContract
- Specified by:
getComment
in interfaceQuery<R>
- Overrides:
getComment
in classAbstractCommonQueryContract
- Returns:
- The comment.
-
setComment
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>
- Overrides:
setComment
in classAbstractSelectionQuery<R>
- Parameters:
comment
- The human-readable comment- Returns:
this
, for method chaining- See Also:
-
addQueryHint
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>
- Parameters:
hint
- The database specific query hint to add.
-
getSupportedHints
-
collectHints
- Overrides:
collectHints
in classAbstractSelectionQuery<R>
-
resolveJdbcParameterTypeIfNecessary
protected boolean resolveJdbcParameterTypeIfNecessary()- Specified by:
resolveJdbcParameterTypeIfNecessary
in classAbstractCommonQueryContract
-
getParameters
- Specified by:
getParameters
in interfaceQuery
- Overrides:
getParameters
in classAbstractCommonQueryContract
-
setParameter
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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
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>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
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>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
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>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
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>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
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>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
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>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
-
setParameter
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>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the query parameter mementovalue
- the argument, which might be null- Returns:
this
, for method chaining- See Also:
-
setParameter
public <P> QueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, Class<P> javaTypeClass) 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>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the query parameter mementovalue
- the argument, which might be nulljavaTypeClass
- aBindableType
representing the type of the parameter- Returns:
this
, for method chaining- See Also:
-
setParameter
public <P> QueryImplementor<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>
- 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
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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
-
setParameterList
public <P> QueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaTypeClass) 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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
-
setParameterList
public <P> QueryImplementor<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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> QueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaTypeClass) 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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
-
setParameterList
public <P> QueryImplementor<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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
public <P> QueryImplementor<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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the parameter mementovalues
- a collection of arguments- Returns:
this
, for method chaining
-
setParameterList
public <P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaTypeClass) 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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
-
setParameterList
public <P> QueryImplementor<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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameterList
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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Parameters:
parameter
- the parameter mementovalues
- a collection of arguments- Returns:
this
, for method chaining
-
setParameterList
public <P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaTypeClass) 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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining- See Also:
-
setParameterList
public <P> QueryImplementor<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>
- Overrides:
setParameterList
in classAbstractSelectionQuery<R>
- Returns:
this
, for method chaining
-
setParameter
public QueryImplementor<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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
public QueryImplementor<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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setParameter
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 interfaceTypedQuery<R>
- Overrides:
setParameter
in classAbstractSelectionQuery<R>
- See Also:
-
setProperties
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>
- Overrides:
setProperties
in classAbstractSelectionQuery<R>
- Parameters:
bean
- any JavaBean or POJO- Returns:
this
, for method chaining
-
setProperties
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>
- Overrides:
setProperties
in classAbstractSelectionQuery<R>
- Parameters:
map
- aMap
of names to arguments- Returns:
this
, for method chaining
-
prepareForExecution
protected void prepareForExecution()- Specified by:
prepareForExecution
in classAbstractSelectionQuery<R>
-
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)
- Throws:
HibernateException
- See Also:
-
doExecuteUpdate
protected abstract int doExecuteUpdate() -
getKeyedResultList
Description copied from interface:SelectionQuery
Execute the query and return the results for the given page, using key-based pagination.- Specified by:
getKeyedResultList
in interfaceSelectionQuery<R>
- 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:
-
setOptionalId
- Specified by:
setOptionalId
in interfaceQueryImplementor<R>
-
setOptionalEntityName
- Specified by:
setOptionalEntityName
in interfaceQueryImplementor<R>
-
setOptionalObject
- Specified by:
setOptionalObject
in interfaceQueryImplementor<R>
-