Interface SelectionQueryImplementor<R>
- All Superinterfaces:
CommonQueryContract, CommonQueryContractImplementor, Query, Query<R>, QueryImplementor<R>, SelectionQuery<R>, TypedQuery<R>, TypedQueryReferenceProducer
- All Known Subinterfaces:
NativeQueryImplementor<R>
-
Method Summary
Modifier and TypeMethodDescriptionaddQueryHint(String hint) Add a database query hint to the SQL query.default MutationQueryImplementorCasts this query as a mutation query.default MutationQueryImplementorCovariant override of Query.asStatement().disableFetchProfile(String profileName) Disable the fetch profile with the given name in this session.enableFetchProfile(String profileName) Enable the fetch profile with the given name during execution of this query.default intExecute an insert, update, or delete statement, and return the number of affected entities.scroll()Returns scrollable access to the query results, using the default scroll mode of the SQL dialect.scroll(ScrollMode scrollMode) Returns scrollable access to the query results.setCacheable(boolean cacheable) Enable/disable second level query (result) caching for this query.setCacheMode(CacheMode cacheMode) Set the currentCacheModein effect for this query.setCacheRegion(String cacheRegion) Set the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).setCacheRetrieveMode(CacheRetrieveMode cacheRetrieveMode) setCacheStoreMode(CacheStoreMode cacheStoreMode) setComment(String comment) Set the comment for this query.setConvertedParameter(int position, P value, Class<? extends AttributeConverter<P, ?>> converter) setConvertedParameter(String name, P value, Class<? extends AttributeConverter<P, ?>> converter) setEntityGraph(EntityGraph<? super R> entityGraph) Apply anEntityGraphto the query using load graph semantics.setEntityGraph(EntityGraph<? super R> graph, GraphSemantic semantic) Apply anEntityGraphto the query.setFetchSize(int fetchSize) Sets a JDBC fetch size hint for the query.setFirstResult(int startPosition) setFlushMode(FlushModeType flushMode) Set theFlushModeTypeto use for this query.setFollowOnLockingStrategy(Locking.FollowOn followOnStrategy) Control how Hibernate should handle cases where it is determined subsequent SQL queries would be needs to completely accomplish locking as requested.setFollowOnStrategy(Locking.FollowOn followOnStrategy) Specifies whether follow-on locking should be appliedsetHibernateLockMode(LockMode lockMode) Specify the rootLockModefor the querySet a hint.setLockMode(LockModeType lockMode) setLockScope(PessimisticLockScope lockScope) Apply a scope to any pessimistic locking applied to the query.setLockTimeout(Timeout lockTimeout) Set a timeout to be applied specifically to pessimistic lock acquisition.setMaxResults(int maxResults) Set the page of results to return.setParameter(int position, Object value) Bind the given argument to an ordinal query parameter.setParameter(int position, Instant value, TemporalType temporalType) Bind anInstantvalue to the ordinal Queryparameter using just the portion indicated by the given TemporalType.setParameter(int position, Calendar value, TemporalType temporalType) QueryoverridesetParameter(int position, Date value, TemporalType temporalType) QueryoverridesetParameter(int position, P value, Type<P> type) Bind the given argument to an ordinal query parameter using the givenType.setParameter(int position, P value, Class<P> type) setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) QueryoverridesetParameter(Parameter<Date> param, Date value, TemporalType temporalType) QueryoverridesetParameter(Parameter<T> param, T value) setParameter(String name, Object value) Bind the given argument to a named query parameter.setParameter(String name, Instant value, TemporalType temporalType) Bind anInstantvalue to the named Queryparameter using just the portion indicated by the given TemporalType.setParameter(String name, Calendar value, TemporalType temporalType) QueryoverridesetParameter(String name, Date value, TemporalType temporalType) QueryoverridesetParameter(String name, P value, Type<P> type) Bind the given argument to a named query parameter using the givenType.setParameter(String name, P value, Class<P> type) setParameter(QueryParameter<P> parameter, P val, Type<P> type) Bind an argument to the query parameter represented by the givenQueryParameter, using the givenType.setParameter(QueryParameter<P> parameter, P value, Class<P> type) Bind an argument to the query parameter represented by the givenQueryParameter, using the givenClassreference to attempt to infer theTypeto use.setParameter(QueryParameter<T> parameter, T value) Bind an argument to the query parameter represented by the givenQueryParameter.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.setParameterList(int position, Collection<? extends P> values, Type<P> type) Bind multiple arguments to an ordinal query parameter using the givenType.setParameterList(int position, Collection<? extends P> values, Class<P> javaType) setParameterList(int position, P[] values, Type<P> type) Bind multiple arguments to an ordinal query parameter using the givenType.setParameterList(int position, P[] values, Class<P> javaType) setParameterList(String name, Object[] values) Bind multiple arguments to a named query parameter.setParameterList(String name, Collection values) Bind multiple arguments to a named query parameter.setParameterList(String name, Collection<? extends P> values, Type<P> type) Bind multiple arguments to a named query parameter using the givenType.setParameterList(String name, Collection<? extends P> values, Class<P> javaType) Bind multiple arguments to a named query parameter using the givenClassreference to attempt to infer theTypeIf unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).setParameterList(String name, P[] values, Type<P> type) Bind multiple arguments to a named query parameter using the givenType.setParameterList(String name, P[] values, Class<P> javaType) Bind multiple arguments to a named query parameter using the given Class reference to attempt to determine theTypeto use.setParameterList(QueryParameter<P> parameter, Collection<? extends P> values) Bind multiple arguments to the query parameter represented by the givenQueryParameter.setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Type<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenType.setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType) Bind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use.setParameterList(QueryParameter<P> parameter, P[] values) Bind multiple arguments to the query parameter represented by the givenQueryParameter.setParameterList(QueryParameter<P> parameter, P[] values, Type<P> type) Bind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theType.setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType) Bind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use.setProperties(Object bean) Bind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using heuristics.setProperties(Map bean) Bind the values of the givenMapto named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.setQueryFlushMode(QueryFlushMode queryFlushMode) Set theQueryFlushModeto use for this query.setQueryPlanCacheable(boolean queryPlanCacheable) Enable/disable query plan caching for this query.setReadOnly(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by thisQuery.setResultListTransformer(ResultListTransformer<R> transformer) Set aResultListTransformer.setTimeout(int timeout) Apply a timeout to the corresponding database query.setTimeout(Timeout timeout) Apply a timeout to the corresponding database query.setTimeout(Integer timeout) Apply a timeout to the corresponding database query.<T> SelectionQueryImplementor<T> setTupleTransformer(TupleTransformer<T> transformer) Set aTupleTransformer.Methods inherited from interface CommonQueryContract
asSelectionQuery, getComment, getEffectiveFlushMode, getParameterMetadata, getQueryFlushMode, getTimeoutMethods inherited from interface CommonQueryContractImplementor
asSelectionQuery, asSelectionQuery, getSession, ofType, withEntityGraphMethods inherited from interface Query
getHints, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound, unwrapMethods inherited from interface Query
getFlushMode, getLockTimeout, getQueryOptions, getQueryString, getResultList, getResultStream, getSingleResult, ofType, withEntityGraphMethods inherited from interface QueryImplementor
asSelectionQuery, getParameterBindingsMethods inherited from interface SelectionQuery
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFetchSize, getHibernateLockMode, getKeyedResultList, getLockMode, getResultCount, getResultList, getResultStream, getResultType, getSingleResult, getSingleResultOrNull, isCacheable, isQueryPlanCacheable, isReadOnly, list, stream, uniqueResult, uniqueResultOptionalMethods inherited from interface TypedQuery
getEntityGraph, getFirstResult, getLockScope, getMaxResultsMethods inherited from interface TypedQueryReferenceProducer
toSelectionMemento
-
Method Details
-
scroll
ScrollableResultsImplementor<R> scroll()Description copied from interface:SelectionQueryReturns scrollable access to the query results, using the default scroll mode of the SQL dialect.- Specified by:
scrollin interfaceQuery<R>- Specified by:
scrollin interfaceQueryImplementor<R>- Specified by:
scrollin interfaceSelectionQuery<R>- See Also:
-
scroll
Description copied from interface:SelectionQueryReturns scrollable access to the query results. The capabilities of the returnedScrollableResultsdepend on the specifiedScrollMode.- Specified by:
scrollin interfaceQuery<R>- Specified by:
scrollin interfaceQueryImplementor<R>- Specified by:
scrollin interfaceSelectionQuery<R>
-
setEntityGraph
Description copied from interface:SelectionQueryApply anEntityGraphto the query using load graph semantics. Covariant override of TypedQuery.setEntityGraph(EntityGraph)This is an alternative way to specify the associations which should be fetched as part of the initial query.
- Specified by:
setEntityGraphin interfaceSelectionQuery<R>- Specified by:
setEntityGraphin interfaceTypedQuery<R>- See Also:
-
setEntityGraph
Description copied from interface:SelectionQueryApply anEntityGraphto the query.This is an alternative way to specify the associations which should be fetched as part of the initial query.
- Specified by:
setEntityGraphin interfaceSelectionQuery<R>- See Also:
-
enableFetchProfile
Description copied from interface:SelectionQueryEnable the fetch profile with the given name during execution of this query. If the requested fetch profile is already enabled, the call has no effect.This is an alternative way to specify the associations which should be fetched as part of the initial query.
- Specified by:
enableFetchProfilein interfaceSelectionQuery<R>- Parameters:
profileName- the name of the fetch profile to be enabled- See Also:
-
disableFetchProfile
Description copied from interface:SelectionQueryDisable the fetch profile with the given name in this session. If the fetch profile is not currently enabled, the call has no effect.- Specified by:
disableFetchProfilein interfaceSelectionQuery<R>- Parameters:
profileName- the name of the fetch profile to be disabled- See Also:
-
setFlushMode
Description copied from interface:QuerySet theFlushModeTypeto use for this query.Setting this to
nullultimately indicates to use theFlushModeof the session. UseQuery.setQueryFlushMode(QueryFlushMode)passingQueryFlushMode.NO_FLUSHinstead to indicate that no automatic flushing should occur.- Specified by:
setFlushModein interfaceCommonQueryContractImplementor- Specified by:
setFlushModein interfaceQuery- Specified by:
setFlushModein interfaceQuery<R>- Specified by:
setFlushModein interfaceQueryImplementor<R>- Specified by:
setFlushModein interfaceSelectionQuery<R>- Specified by:
setFlushModein interfaceTypedQuery<R>- See Also:
-
setQueryFlushMode
Description copied from interface:CommonQueryContractSet theQueryFlushModeto use for this query.- Specified by:
setQueryFlushModein interfaceCommonQueryContract- Specified by:
setQueryFlushModein interfaceCommonQueryContractImplementor- Specified by:
setQueryFlushModein interfaceQuery<R>- Specified by:
setQueryFlushModein interfaceQueryImplementor<R>- Specified by:
setQueryFlushModein interfaceSelectionQuery<R>- See Also:
-
setTimeout
Description copied from interface:QueryApply a timeout to the corresponding database query.- Specified by:
setTimeoutin interfaceCommonQueryContract- Specified by:
setTimeoutin interfaceCommonQueryContractImplementor- Specified by:
setTimeoutin interfaceQuery<R>- Specified by:
setTimeoutin interfaceQueryImplementor<R>- Specified by:
setTimeoutin interfaceSelectionQuery<R>- See Also:
-
setTimeout
Description copied from interface:QueryApply a timeout to the corresponding database query.- Specified by:
setTimeoutin interfaceCommonQueryContract- Specified by:
setTimeoutin interfaceCommonQueryContractImplementor- Specified by:
setTimeoutin interfaceQuery- Specified by:
setTimeoutin interfaceQuery<R>- Specified by:
setTimeoutin interfaceQueryImplementor<R>- Specified by:
setTimeoutin interfaceSelectionQuery<R>- Specified by:
setTimeoutin interfaceTypedQuery<R>- See Also:
-
setTimeout
Description copied from interface:QueryApply a timeout to the corresponding database query.- Specified by:
setTimeoutin interfaceCommonQueryContract- Specified by:
setTimeoutin interfaceCommonQueryContractImplementor- Specified by:
setTimeoutin interfaceQuery- Specified by:
setTimeoutin interfaceQuery<R>- Specified by:
setTimeoutin interfaceQueryImplementor<R>- Specified by:
setTimeoutin interfaceSelectionQuery<R>- Specified by:
setTimeoutin interfaceTypedQuery<R>
-
setComment
Description copied from interface:QuerySet the comment for this query.If SQL commenting is enabled, the comment will be added to the SQL query sent to the database, which may be useful for identifying the source of troublesome queries.
SQL commenting may be enabled using the configuration property "hibernate.use_sql_comments".
- Specified by:
setCommentin interfaceCommonQueryContract- Specified by:
setCommentin interfaceCommonQueryContractImplementor- Specified by:
setCommentin interfaceQuery<R>- Specified by:
setCommentin interfaceQueryImplementor<R>- Specified by:
setCommentin interfaceSelectionQuery<R>- See Also:
-
setFetchSize
Description copied from interface:SelectionQuerySets a JDBC fetch size hint for the query.- Specified by:
setFetchSizein interfaceQuery<R>- Specified by:
setFetchSizein interfaceSelectionQuery<R>- Parameters:
fetchSize- the fetch size hint- Returns:
this, for method chaining- See Also:
-
setReadOnly
Description copied from interface:SelectionQuerySet the read-only/modifiable mode for entities and proxies loaded by thisQuery. This setting overrides the default setting for the persistence context,Session.isDefaultReadOnly().To set the default read-only/modifiable setting used for entities and proxies that are loaded into the session, use
Session.setDefaultReadOnly(boolean).Read-only entities are not dirty-checked and snapshots of persistent state are not maintained. Read-only entities can be modified, but changes are not persisted.
When a proxy is initialized, the loaded entity will have the same read-only/modifiable setting as the uninitialized proxy has, regardless of the session's current setting.
The read-only/modifiable setting has no impact on entities/proxies returned by the query that existed in the session beforeQuery the query was executed.
- Specified by:
setReadOnlyin interfaceQuery<R>- Specified by:
setReadOnlyin interfaceSelectionQuery<R>- Parameters:
readOnly-trueindicates that entities and proxies loaded by the query are to be put in read-only mode;falseindicates that entities and proxies loaded by the query will be put in modifiable mode- Returns:
this, for method chaining
-
setMaxResults
Description copied from interface:SelectionQuery- Specified by:
setMaxResultsin interfaceCommonQueryContractImplementor- Specified by:
setMaxResultsin interfaceQuery- Specified by:
setMaxResultsin interfaceQuery<R>- Specified by:
setMaxResultsin interfaceQueryImplementor<R>- Specified by:
setMaxResultsin interfaceSelectionQuery<R>- Specified by:
setMaxResultsin interfaceTypedQuery<R>
-
setFirstResult
Description copied from interface:SelectionQuery- Specified by:
setFirstResultin interfaceCommonQueryContractImplementor- Specified by:
setFirstResultin interfaceQuery- Specified by:
setFirstResultin interfaceQuery<R>- Specified by:
setFirstResultin interfaceQueryImplementor<R>- Specified by:
setFirstResultin interfaceSelectionQuery<R>- Specified by:
setFirstResultin interfaceTypedQuery<R>
-
setPage
Description copied from interface:SelectionQuerySet the page of results to return.- Specified by:
setPagein interfaceSelectionQuery<R>- See Also:
-
setCacheMode
Description copied from interface:SelectionQuerySet the currentCacheModein effect for this query.Set it to
nullto indicate that theCacheModeof thesessionshould be used.- Specified by:
setCacheModein interfaceQuery<R>- Specified by:
setCacheModein interfaceSelectionQuery<R>- See Also:
-
setCacheStoreMode
- Specified by:
setCacheStoreModein interfaceCommonQueryContractImplementor- Specified by:
setCacheStoreModein interfaceQuery- Specified by:
setCacheStoreModein interfaceQuery<R>- Specified by:
setCacheStoreModein interfaceQueryImplementor<R>- Specified by:
setCacheStoreModein interfaceSelectionQuery<R>- Specified by:
setCacheStoreModein interfaceTypedQuery<R>- See Also:
-
setCacheRetrieveMode
- Specified by:
setCacheRetrieveModein interfaceCommonQueryContractImplementor- Specified by:
setCacheRetrieveModein interfaceQuery- Specified by:
setCacheRetrieveModein interfaceQuery<R>- Specified by:
setCacheRetrieveModein interfaceQueryImplementor<R>- Specified by:
setCacheRetrieveModein interfaceSelectionQuery<R>- Specified by:
setCacheRetrieveModein interfaceTypedQuery<R>- See Also:
-
setCacheable
Description copied from interface:SelectionQueryEnable/disable second level query (result) caching for this query.- Specified by:
setCacheablein interfaceQuery<R>- Specified by:
setCacheablein interfaceSelectionQuery<R>- See Also:
-
setQueryPlanCacheable
Description copied from interface:SelectionQueryEnable/disable query plan caching for this query.- Specified by:
setQueryPlanCacheablein interfaceQuery<R>- Specified by:
setQueryPlanCacheablein interfaceQueryImplementor<R>- Specified by:
setQueryPlanCacheablein interfaceSelectionQuery<R>- See Also:
-
setCacheRegion
Description copied from interface:SelectionQuerySet the name of the cache region where query results should be cached (assumingSelectionQuery.isCacheable()).nullindicates to use the default region.- Specified by:
setCacheRegionin interfaceQuery<R>- Specified by:
setCacheRegionin interfaceSelectionQuery<R>- See Also:
-
setLockMode
Description copied from interface:SelectionQuery- Specified by:
setLockModein interfaceCommonQueryContractImplementor- Specified by:
setLockModein interfaceQuery- Specified by:
setLockModein interfaceQuery<R>- Specified by:
setLockModein interfaceQueryImplementor<R>- Specified by:
setLockModein interfaceSelectionQuery<R>- Specified by:
setLockModein interfaceTypedQuery<R>- See Also:
-
setLockTimeout
Description copied from interface:QuerySet a timeout to be applied specifically to pessimistic lock acquisition.- Specified by:
setLockTimeoutin interfaceQuery<R>- Specified by:
setLockTimeoutin interfaceSelectionQuery<R>- See Also:
-
setHibernateLockMode
Description copied from interface:SelectionQuerySpecify the rootLockModefor the query- Specified by:
setHibernateLockModein interfaceQuery<R>- Specified by:
setHibernateLockModein interfaceQueryImplementor<R>- Specified by:
setHibernateLockModein interfaceSelectionQuery<R>- See Also:
-
setFollowOnLockingStrategy
Description copied from interface:QueryControl how Hibernate should handle cases where it is determined subsequent SQL queries would be needs to completely accomplish locking as requested.- Specified by:
setFollowOnLockingStrategyin interfaceQuery<R>- Specified by:
setFollowOnLockingStrategyin interfaceQueryImplementor<R>- Parameters:
followOnStrategy- The strategy for follow-on locking.- Returns:
this, for method chaining
-
setFollowOnStrategy
Description copied from interface:SelectionQuerySpecifies whether follow-on locking should be applied- Specified by:
setFollowOnStrategyin interfaceQuery<R>- Specified by:
setFollowOnStrategyin interfaceQueryImplementor<R>- Specified by:
setFollowOnStrategyin interfaceSelectionQuery<R>- Parameters:
followOnStrategy- The strategy for follow-on locking.- Returns:
this, for method chaining
-
setTupleTransformer
Description copied from interface:SelectionQuerySet aTupleTransformer.- Specified by:
setTupleTransformerin interfaceQuery<R>- Specified by:
setTupleTransformerin interfaceSelectionQuery<R>
-
setResultListTransformer
Description copied from interface:SelectionQuerySet aResultListTransformer.- Specified by:
setResultListTransformerin interfaceQuery<R>- Specified by:
setResultListTransformerin interfaceSelectionQuery<R>
-
setLockScope
Description copied from interface:SelectionQueryApply a scope to any pessimistic locking applied to the query.- Specified by:
setLockScopein interfaceQuery<R>- Specified by:
setLockScopein interfaceQueryImplementor<R>- Specified by:
setLockScopein interfaceSelectionQuery<R>- Specified by:
setLockScopein interfaceTypedQuery<R>- Parameters:
lockScope- The lock scope to apply- Returns:
this, for method chaining
-
addQueryHint
Description copied from interface:QueryAdd a database query hint to the SQL query.Multiple query hints may be specified. The operation
Dialect.getQueryHintString(String, List)determines how the hint is actually added to the SQL query.- Specified by:
addQueryHintin interfaceCommonQueryContract- Specified by:
addQueryHintin interfaceCommonQueryContractImplementor- Specified by:
addQueryHintin interfaceQuery<R>- Specified by:
addQueryHintin interfaceQueryImplementor<R>
-
setHint
Description copied from interface:QuerySet a hint. Hints are a JPA-standard way to control provider-specific behavior affecting execution of the query. Clients of native Hibernate API should make use of type-safe operations of this interface and of its subtypes. For example,SelectionQuery.setCacheRegion(String)is preferred overHibernateHints.HINT_CACHE_REGION.The hints understood by Hibernate are enumerated by
AvailableHints.- Specified by:
setHintin interfaceCommonQueryContract- Specified by:
setHintin interfaceCommonQueryContractImplementor- Specified by:
setHintin interfaceQuery- Specified by:
setHintin interfaceQuery<R>- Specified by:
setHintin interfaceQueryImplementor<R>- Specified by:
setHintin interfaceSelectionQuery<R>- Specified by:
setHintin interfaceTypedQuery<R>- See Also:
-
setParameter
Description copied from interface:QueryBind the given argument to a named query parameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type", or pass a
TypedParameterValue.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
Description copied from interface:QueryBind the given argument to a named query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(String, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
Description copied from interface:QueryBind the given argument to a named query parameter using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>
-
setParameter
Description copied from interface:QueryBind the given argument to an ordinal query parameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type", or pass a
TypedParameterValue.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
Description copied from interface:QueryBind the given argument to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(int, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
Description copied from interface:QueryBind the given argument to an ordinal query parameter using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>
-
setParameter
Description copied from interface:QueryBind an argument to the query parameter represented by the givenQueryParameter.If the type of the parameter cannot be inferred from the context in which it occurs, use one of the overloads which accepts a "type".
- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be null- Returns:
this, for method chaining- See Also:
-
setParameter
Description copied from interface:QueryBind an argument to the query parameter represented by the givenQueryParameter, using the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameter(QueryParameter, Object).- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Parameters:
parameter- the query parameter mementovalue- the argument, which might be nulltype- aTyperepresenting the type of the parameter- Returns:
this, for method chaining- See Also:
-
setParameter
Description copied from interface:QueryBind an argument to the query parameter represented by the givenQueryParameter, using the givenType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Parameters:
parameter- the query parameter mementoval- the argument, which might be nulltype- aTyperepresenting the type of the parameter- Returns:
this, for method chaining
-
setParameter
Description copied from interface:Query- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setProperties
Description copied from interface:QueryBind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using heuristics.- Specified by:
setPropertiesin interfaceCommonQueryContract- Specified by:
setPropertiesin interfaceCommonQueryContractImplementor- Specified by:
setPropertiesin interfaceQuery<R>- Specified by:
setPropertiesin interfaceQueryImplementor<R>- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Parameters:
bean- any JavaBean or POJO- Returns:
this, for method chaining
-
setProperties
Description copied from interface:QueryBind the values of the givenMapto named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.- Specified by:
setPropertiesin interfaceCommonQueryContract- Specified by:
setPropertiesin interfaceCommonQueryContractImplementor- Specified by:
setPropertiesin interfaceQuery<R>- Specified by:
setPropertiesin interfaceQueryImplementor<R>- Specified by:
setPropertiesin interfaceSelectionQuery<R>- Parameters:
bean- aMapof names to arguments- Returns:
this, for method chaining
-
setConvertedParameter
<P> SelectionQueryImplementor<R> setConvertedParameter(String name, P value, Class<? extends AttributeConverter<P, ?>> converter) Description copied from interface:Query- Specified by:
setConvertedParameterin interfaceCommonQueryContract- Specified by:
setConvertedParameterin interfaceCommonQueryContractImplementor- Specified by:
setConvertedParameterin interfaceQuery- Specified by:
setConvertedParameterin interfaceQuery<R>- Specified by:
setConvertedParameterin interfaceQueryImplementor<R>- Specified by:
setConvertedParameterin interfaceSelectionQuery<R>- Specified by:
setConvertedParameterin interfaceTypedQuery<R>- See Also:
-
setConvertedParameter
<P> SelectionQueryImplementor<R> setConvertedParameter(int position, P value, Class<? extends AttributeConverter<P, ?>> converter) Description copied from interface:Query- Specified by:
setConvertedParameterin interfaceCommonQueryContract- Specified by:
setConvertedParameterin interfaceCommonQueryContractImplementor- Specified by:
setConvertedParameterin interfaceQuery- Specified by:
setConvertedParameterin interfaceQuery<R>- Specified by:
setConvertedParameterin interfaceQueryImplementor<R>- Specified by:
setConvertedParameterin interfaceSelectionQuery<R>- Specified by:
setConvertedParameterin interfaceTypedQuery<R>- See Also:
-
setParameterList
Description copied from interface:QueryBind multiple arguments to a named query parameter.The "type mapping" for the binding is inferred from the type of the first collection element.
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaType) Description copied from interface:QueryBind multiple arguments to a named query parameter using the givenClassreference to attempt to infer theTypeIf unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Type<P> type) Description copied from interface:QueryBind multiple arguments to a named query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:QueryBind multiple arguments to a named query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:QueryBind multiple arguments to a named query parameter using the given Class reference to attempt to determine theTypeto use. If unable to determine an appropriateType,CommonQueryContract.setParameterList(String, Collection)is used- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
Description copied from interface:QueryBind multiple arguments to a named query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:QueryBind multiple arguments to an ordinal query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaType) Description copied from interface:QueryBind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Type<P> type) Description copied from interface:QueryBind multiple arguments to an ordinal query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:QueryBind multiple arguments to an ordinal query parameter.The "type mapping" for the binding is inferred from the type of the first collection element
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:QueryBind multiple arguments to an ordinal query parameter using the givenClassreference to attempt to infer theType. If unable to infer an appropriateType, fall back toCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
Description copied from interface:QueryBind multiple arguments to an ordinal query parameter using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values) Description copied from interface:QueryBind multiple arguments to the query parameter represented by the givenQueryParameter.The type of the parameter is inferred from the context in which it occurs, and from the type of the first given argument.
- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType) Description copied from interface:QueryBind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Type<P> type) Description copied from interface:QueryBind multiple arguments to the query parameter represented by the givenQueryParameter, using the givenType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameterList
Description copied from interface:QueryBind multiple arguments to the query parameter represented by the givenQueryParameter.The type of the parameter is inferred between the context in which it occurs, the type associated with the
QueryParameterand the type of the first given argument.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Parameters:
parameter- the parameter mementovalues- a collection of arguments- Returns:
this, for method chaining
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType) Description copied from interface:QueryBind multiple arguments to the query parameter represented by the givenQueryParameterusing the givenClassreference to attempt to infer theTypeto use. If unable to infer an appropriateType, fall back to usingCommonQueryContract.setParameterList(String, Collection).- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining- See Also:
-
setParameterList
<P> SelectionQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Type<P> type) Description copied from interface:QueryBind multiple arguments to the query parameter represented by the givenQueryParameter, using the given theType.- Specified by:
setParameterListin interfaceCommonQueryContract- Specified by:
setParameterListin interfaceCommonQueryContractImplementor- Specified by:
setParameterListin interfaceQuery<R>- Specified by:
setParameterListin interfaceQueryImplementor<R>- Specified by:
setParameterListin interfaceSelectionQuery<R>- Returns:
this, for method chaining
-
setParameter
Description copied from interface:QueryBind anInstantvalue to the named Queryparameter using just the portion indicated by the given TemporalType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
Description copied from interface:QueryBind anInstantvalue to the ordinal Queryparameter using just the portion indicated by the given TemporalType.- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
SelectionQueryImplementor<R> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
setParameter
SelectionQueryImplementor<R> setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Description copied from interface:QueryQueryoverride- Specified by:
setParameterin interfaceCommonQueryContract- Specified by:
setParameterin interfaceCommonQueryContractImplementor- Specified by:
setParameterin interfaceQuery- Specified by:
setParameterin interfaceQuery<R>- Specified by:
setParameterin interfaceQueryImplementor<R>- Specified by:
setParameterin interfaceSelectionQuery<R>- Specified by:
setParameterin interfaceTypedQuery<R>- See Also:
-
asMutationQuery
Description copied from interface:CommonQueryContractCasts this query as a mutation query.- Specified by:
asMutationQueryin interfaceCommonQueryContract- Specified by:
asMutationQueryin interfaceCommonQueryContractImplementor- Specified by:
asMutationQueryin interfaceQueryImplementor<R>
-
asStatement
Description copied from interface:QueryCovariant override of Query.asStatement().- Specified by:
asStatementin interfaceCommonQueryContractImplementor- Specified by:
asStatementin interfaceQuery- Specified by:
asStatementin interfaceQuery<R>- Specified by:
asStatementin interfaceQueryImplementor<R>- See Also:
-
executeUpdate
default int executeUpdate()Description copied from interface:QueryExecute an insert, update, or delete statement, and return the number of affected entities.For use with instances of
MutationQuerycreated usingSharedSessionContract.createMutationQuery(String),SharedSessionContract.createNamedMutationQuery(String),SharedSessionContract.createNativeMutationQuery(String), orSharedSessionContract.createMutationQuery(jakarta.persistence.criteria.CriteriaStatement).- Specified by:
executeUpdatein interfaceQuery- Specified by:
executeUpdatein interfaceQuery<R>- Specified by:
executeUpdatein interfaceTypedQuery<R>- Returns:
- the number of affected entity instances (may differ from the number of affected rows)
- See Also:
-