Package org.hibernate.reactive.stage
Interface Stage.Query<R>
- All Superinterfaces:
Stage.AbstractQuery
,Stage.MutationQuery
,Stage.SelectionQuery<R>
- Enclosing interface:
- Stage
-
Method Summary
Modifier and TypeMethodDescriptionsetCacheable
(boolean cacheable) Enable or disable caching of this query result set in the second-level query cache.setCacheMode
(CacheMode cacheMode) Set the currentCacheMode
in effect while this query is being executed.setCacheRegion
(String cacheRegion) Set the name of the cache region in which to store this query result set ifcaching is enabled
.default Stage.Query<R>
setCacheRetrieveMode
(jakarta.persistence.CacheRetrieveMode cacheRetrieveMode) Set the currentCacheRetrieveMode
in effect while this query is being executed.default Stage.Query<R>
setCacheStoreMode
(jakarta.persistence.CacheStoreMode cacheStoreMode) Set the currentCacheStoreMode
in effect while this query is being executed.setComment
(String comment) Set the comment for this query.setFirstResult
(int firstResult) Set the position of the first result that may be returned by this query when executed, where the results are numbered from 0.default Stage.Query<R>
setFlushMode
(jakarta.persistence.FlushModeType flushModeType) Set the currentFlushModeType
in effect while this query is being executed.setFlushMode
(FlushMode flushMode) Set the currentFlushMode
in effect while this query is being executed.default Stage.Query<R>
setLockMode
(jakarta.persistence.LockModeType lockModeType) Set theLockModeType
to use for the whole query.default Stage.Query<R>
setLockMode
(String alias, jakarta.persistence.LockModeType lockModeType) Set theLockModeType
to use for specified alias (as defined in the query'sfrom
clause).setLockMode
(String alias, LockMode lockMode) Set theLockMode
to use for specified alias (as defined in the query'sfrom
clause).setLockMode
(LockMode lockMode) Set theLockMode
to use for the whole query.setMaxResults
(int maxResults) Set the maximum number of results that may be returned by this query when executed.setParameter
(int parameter, Object argument) Set the value of an ordinal parameter.<T> Stage.Query<R>
setParameter
(jakarta.persistence.Parameter<T> parameter, T argument) Set the value of a typed parameter.setParameter
(String parameter, Object argument) Set the value of a named parameter.Set theEntityGraph
that will be used as a fetch plan for the root entity returned by this query.setReadOnly
(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by this Query.Methods inherited from interface org.hibernate.reactive.stage.Stage.AbstractQuery
getComment
Methods inherited from interface org.hibernate.reactive.stage.Stage.MutationQuery
executeUpdate
Methods inherited from interface org.hibernate.reactive.stage.Stage.SelectionQuery
enableFetchProfile, getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFirstResult, getFlushMode, getMaxResults, getResultCount, getResultList, getSingleResult, getSingleResultOrNull, isCacheable, isReadOnly, setPage
-
Method Details
-
setMaxResults
Description copied from interface:Stage.SelectionQuery
Set the maximum number of results that may be returned by this query when executed.- Specified by:
setMaxResults
in interfaceStage.SelectionQuery<R>
-
setFirstResult
Description copied from interface:Stage.SelectionQuery
Set the position of the first result that may be returned by this query when executed, where the results are numbered from 0.- Specified by:
setFirstResult
in interfaceStage.SelectionQuery<R>
-
setReadOnly
Description copied from interface:Stage.SelectionQuery
Set the read-only/modifiable mode for entities and proxies loaded by this Query. This setting overrides the default setting for the persistence context.- Specified by:
setReadOnly
in interfaceStage.SelectionQuery<R>
- See Also:
-
setCacheable
Description copied from interface:Stage.SelectionQuery
Enable or disable caching of this query result set in the second-level query cache.- Specified by:
setCacheable
in interfaceStage.SelectionQuery<R>
- Parameters:
cacheable
-true
if this query is cacheable
-
setCacheRegion
Description copied from interface:Stage.SelectionQuery
Set the name of the cache region in which to store this query result set ifcaching is enabled
.- Specified by:
setCacheRegion
in interfaceStage.SelectionQuery<R>
- Parameters:
cacheRegion
- the name of the cache region
-
setCacheMode
Description copied from interface:Stage.SelectionQuery
Set the currentCacheMode
in effect while this query is being executed.- Specified by:
setCacheMode
in interfaceStage.SelectionQuery<R>
-
setCacheStoreMode
Description copied from interface:Stage.SelectionQuery
Set the currentCacheStoreMode
in effect while this query is being executed.- Specified by:
setCacheStoreMode
in interfaceStage.SelectionQuery<R>
-
setCacheRetrieveMode
default Stage.Query<R> setCacheRetrieveMode(jakarta.persistence.CacheRetrieveMode cacheRetrieveMode) Description copied from interface:Stage.SelectionQuery
Set the currentCacheRetrieveMode
in effect while this query is being executed.- Specified by:
setCacheRetrieveMode
in interfaceStage.SelectionQuery<R>
-
setFlushMode
Description copied from interface:Stage.SelectionQuery
Set the currentFlushMode
in effect while this query is being executed.- Specified by:
setFlushMode
in interfaceStage.SelectionQuery<R>
-
setFlushMode
Description copied from interface:Stage.SelectionQuery
Set the currentFlushModeType
in effect while this query is being executed.- Specified by:
setFlushMode
in interfaceStage.SelectionQuery<R>
-
setLockMode
Description copied from interface:Stage.SelectionQuery
Set theLockMode
to use for the whole query.- Specified by:
setLockMode
in interfaceStage.SelectionQuery<R>
-
setLockMode
Description copied from interface:Stage.SelectionQuery
Set theLockModeType
to use for the whole query.- Specified by:
setLockMode
in interfaceStage.SelectionQuery<R>
-
setLockMode
Description copied from interface:Stage.SelectionQuery
Set theLockMode
to use for specified alias (as defined in the query'sfrom
clause).- Specified by:
setLockMode
in interfaceStage.SelectionQuery<R>
- Parameters:
alias
- the from clause aliaslockMode
- the requestedLockMode
- See Also:
-
setLockMode
Description copied from interface:Stage.SelectionQuery
Set theLockModeType
to use for specified alias (as defined in the query'sfrom
clause).- Specified by:
setLockMode
in interfaceStage.SelectionQuery<R>
- Parameters:
alias
- the from clause aliaslockModeType
- the requestedLockModeType
- See Also:
-
setPlan
Description copied from interface:Stage.SelectionQuery
Set theEntityGraph
that will be used as a fetch plan for the root entity returned by this query.- Specified by:
setPlan
in interfaceStage.SelectionQuery<R>
-
setParameter
Description copied from interface:Stage.AbstractQuery
Set the value of an ordinal parameter. Ordinal parameters are numbered from 1, and are specified in the query using placeholder tokens of form?1
,?2
, etc.- Specified by:
setParameter
in interfaceStage.AbstractQuery
- Specified by:
setParameter
in interfaceStage.MutationQuery
- Specified by:
setParameter
in interfaceStage.SelectionQuery<R>
- Parameters:
parameter
- an integer identifying the ordinal parameterargument
- the argument to set
-
setParameter
Description copied from interface:Stage.AbstractQuery
Set the value of a named parameter. Named parameters are specified in the query using placeholder tokens of form:name
.- Specified by:
setParameter
in interfaceStage.AbstractQuery
- Specified by:
setParameter
in interfaceStage.MutationQuery
- Specified by:
setParameter
in interfaceStage.SelectionQuery<R>
- Parameters:
parameter
- the name of the parameterargument
- the argument to set
-
setParameter
Description copied from interface:Stage.AbstractQuery
Set the value of a typed parameter. Typed parameters are obtained from the JPACriteriaBuilder
, which may itself be obtained by callingStage.SessionFactory.getCriteriaBuilder()
.- Specified by:
setParameter
in interfaceStage.AbstractQuery
- Specified by:
setParameter
in interfaceStage.MutationQuery
- Specified by:
setParameter
in interfaceStage.SelectionQuery<R>
- Parameters:
parameter
- the parameterargument
- the argument to set- See Also:
-
CriteriaBuilder.parameter(Class)
-
setComment
Description copied from interface:Stage.AbstractQuery
Set the comment for this query. This comment will be prepended to the SQL query sent to the database.- Specified by:
setComment
in interfaceStage.AbstractQuery
- Specified by:
setComment
in interfaceStage.MutationQuery
- Specified by:
setComment
in interfaceStage.SelectionQuery<R>
- Parameters:
comment
- The human-readable comment
-