Package org.hibernate.reactive.stage
Interface Stage.Query<R>
-
- All Superinterfaces:
Stage.AbstractQuery,Stage.MutationQuery,Stage.SelectionQuery<R>
- Enclosing interface:
- Stage
public static interface Stage.Query<R> extends Stage.SelectionQuery<R>, Stage.MutationQuery
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Stage.Query<R>setCacheable(boolean cacheable)Enable or disable caching of this query result set in the second-level query cache.Stage.Query<R>setCacheMode(CacheMode cacheMode)Set the currentCacheModein effect while this query is being executed.Stage.Query<R>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 currentCacheRetrieveModein effect while this query is being executed.default Stage.Query<R>setCacheStoreMode(jakarta.persistence.CacheStoreMode cacheStoreMode)Set the currentCacheStoreModein effect while this query is being executed.Stage.Query<R>setComment(String comment)Set the comment for this query.Stage.Query<R>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 currentFlushModeTypein effect while this query is being executed.Stage.Query<R>setFlushMode(FlushMode flushMode)Set the currentFlushModein effect while this query is being executed.default Stage.Query<R>setLockMode(jakarta.persistence.LockModeType lockModeType)Set theLockModeTypeto use for the whole query.default Stage.Query<R>setLockMode(String alias, jakarta.persistence.LockModeType lockModeType)Set theLockModeTypeto use for specified alias (as defined in the query'sfromclause).Stage.Query<R>setLockMode(String alias, LockMode lockMode)Set theLockModeto use for specified alias (as defined in the query'sfromclause).Stage.Query<R>setLockMode(LockMode lockMode)Set theLockModeto use for the whole query.Stage.Query<R>setMaxResults(int maxResults)Set the maximum number of results that may be returned by this query when executed.Stage.Query<R>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.Stage.Query<R>setParameter(String parameter, Object argument)Set the value of a named parameter.Stage.Query<R>setPlan(jakarta.persistence.EntityGraph<R> entityGraph)Set theEntityGraphthat will be used as a fetch plan for the root entity returned by this query.Stage.Query<R>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
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFirstResult, getFlushMode, getMaxResults, getResultList, getSingleResult, getSingleResultOrNull, isCacheable, isReadOnly
-
-
-
-
Method Detail
-
setMaxResults
Stage.Query<R> setMaxResults(int maxResults)
Description copied from interface:Stage.SelectionQuerySet the maximum number of results that may be returned by this query when executed.- Specified by:
setMaxResultsin interfaceStage.SelectionQuery<R>
-
setFirstResult
Stage.Query<R> setFirstResult(int firstResult)
Description copied from interface:Stage.SelectionQuerySet the position of the first result that may be returned by this query when executed, where the results are numbered from 0.- Specified by:
setFirstResultin interfaceStage.SelectionQuery<R>
-
setReadOnly
Stage.Query<R> setReadOnly(boolean readOnly)
Description copied from interface:Stage.SelectionQuerySet 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:
setReadOnlyin interfaceStage.SelectionQuery<R>- See Also:
Stage.Session.setDefaultReadOnly(boolean)
-
setCacheable
Stage.Query<R> setCacheable(boolean cacheable)
Description copied from interface:Stage.SelectionQueryEnable or disable caching of this query result set in the second-level query cache.- Specified by:
setCacheablein interfaceStage.SelectionQuery<R>- Parameters:
cacheable-trueif this query is cacheable
-
setCacheRegion
Stage.Query<R> setCacheRegion(String cacheRegion)
Description copied from interface:Stage.SelectionQuerySet the name of the cache region in which to store this query result set ifcaching is enabled.- Specified by:
setCacheRegionin interfaceStage.SelectionQuery<R>- Parameters:
cacheRegion- the name of the cache region
-
setCacheMode
Stage.Query<R> setCacheMode(CacheMode cacheMode)
Description copied from interface:Stage.SelectionQuerySet the currentCacheModein effect while this query is being executed.- Specified by:
setCacheModein interfaceStage.SelectionQuery<R>
-
setCacheStoreMode
default Stage.Query<R> setCacheStoreMode(jakarta.persistence.CacheStoreMode cacheStoreMode)
Description copied from interface:Stage.SelectionQuerySet the currentCacheStoreModein effect while this query is being executed.- Specified by:
setCacheStoreModein interfaceStage.SelectionQuery<R>
-
setCacheRetrieveMode
default Stage.Query<R> setCacheRetrieveMode(jakarta.persistence.CacheRetrieveMode cacheRetrieveMode)
Description copied from interface:Stage.SelectionQuerySet the currentCacheRetrieveModein effect while this query is being executed.- Specified by:
setCacheRetrieveModein interfaceStage.SelectionQuery<R>
-
setFlushMode
Stage.Query<R> setFlushMode(FlushMode flushMode)
Description copied from interface:Stage.SelectionQuerySet the currentFlushModein effect while this query is being executed.- Specified by:
setFlushModein interfaceStage.SelectionQuery<R>
-
setFlushMode
default Stage.Query<R> setFlushMode(jakarta.persistence.FlushModeType flushModeType)
Description copied from interface:Stage.SelectionQuerySet the currentFlushModeTypein effect while this query is being executed.- Specified by:
setFlushModein interfaceStage.SelectionQuery<R>
-
setLockMode
Stage.Query<R> setLockMode(LockMode lockMode)
Description copied from interface:Stage.SelectionQuerySet theLockModeto use for the whole query.- Specified by:
setLockModein interfaceStage.SelectionQuery<R>
-
setLockMode
default Stage.Query<R> setLockMode(jakarta.persistence.LockModeType lockModeType)
Description copied from interface:Stage.SelectionQuerySet theLockModeTypeto use for the whole query.- Specified by:
setLockModein interfaceStage.SelectionQuery<R>
-
setLockMode
Stage.Query<R> setLockMode(String alias, LockMode lockMode)
Description copied from interface:Stage.SelectionQuerySet theLockModeto use for specified alias (as defined in the query'sfromclause).- Specified by:
setLockModein interfaceStage.SelectionQuery<R>- Parameters:
alias- the from clause aliaslockMode- the requestedLockMode- See Also:
Query.setLockMode(String,LockMode)
-
setLockMode
default Stage.Query<R> setLockMode(String alias, jakarta.persistence.LockModeType lockModeType)
Description copied from interface:Stage.SelectionQuerySet theLockModeTypeto use for specified alias (as defined in the query'sfromclause).- Specified by:
setLockModein interfaceStage.SelectionQuery<R>- Parameters:
alias- the from clause aliaslockModeType- the requestedLockModeType- See Also:
Query.setLockMode(String,LockMode)
-
setPlan
Stage.Query<R> setPlan(jakarta.persistence.EntityGraph<R> entityGraph)
Description copied from interface:Stage.SelectionQuerySet theEntityGraphthat will be used as a fetch plan for the root entity returned by this query.- Specified by:
setPlanin interfaceStage.SelectionQuery<R>
-
setParameter
Stage.Query<R> setParameter(int parameter, Object argument)
Description copied from interface:Stage.AbstractQuerySet 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:
setParameterin interfaceStage.AbstractQuery- Specified by:
setParameterin interfaceStage.MutationQuery- Specified by:
setParameterin interfaceStage.SelectionQuery<R>- Parameters:
parameter- an integer identifying the ordinal parameterargument- the argument to set
-
setParameter
Stage.Query<R> setParameter(String parameter, Object argument)
Description copied from interface:Stage.AbstractQuerySet the value of a named parameter. Named parameters are specified in the query using placeholder tokens of form:name.- Specified by:
setParameterin interfaceStage.AbstractQuery- Specified by:
setParameterin interfaceStage.MutationQuery- Specified by:
setParameterin interfaceStage.SelectionQuery<R>- Parameters:
parameter- the name of the parameterargument- the argument to set
-
setParameter
<T> Stage.Query<R> setParameter(jakarta.persistence.Parameter<T> parameter, T argument)
Description copied from interface:Stage.AbstractQuerySet the value of a typed parameter. Typed parameters are obtained from the JPACriteriaBuilder, which may itself be obtained by callingStage.SessionFactory.getCriteriaBuilder().- Specified by:
setParameterin interfaceStage.AbstractQuery- Specified by:
setParameterin interfaceStage.MutationQuery- Specified by:
setParameterin interfaceStage.SelectionQuery<R>- Parameters:
parameter- the parameterargument- the argument to set- See Also:
CriteriaBuilder.parameter(Class)
-
setComment
Stage.Query<R> setComment(String comment)
Description copied from interface:Stage.AbstractQuerySet the comment for this query. This comment will be prepended to the SQL query sent to the database.- Specified by:
setCommentin interfaceStage.AbstractQuery- Specified by:
setCommentin interfaceStage.MutationQuery- Specified by:
setCommentin interfaceStage.SelectionQuery<R>- Parameters:
comment- The human-readable comment
-
-