Package org.hibernate.reactive.mutiny
Interface Mutiny.Query<R>
-
- All Superinterfaces:
Mutiny.AbstractQuery
,Mutiny.MutationQuery
,Mutiny.SelectionQuery<R>
- Enclosing interface:
- Mutiny
public static interface Mutiny.Query<R> extends Mutiny.SelectionQuery<R>, Mutiny.MutationQuery
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Mutiny.Query<R>
enableFetchProfile(String profileName)
Enable a fetch profile which will be in effect during execution of this query.Mutiny.Query<R>
setCacheable(boolean cacheable)
Enable or disable caching of this query result set in the second-level query cache.Mutiny.Query<R>
setCacheMode(CacheMode cacheMode)
Set the currentCacheMode
in effect while this query is being executed.Mutiny.Query<R>
setCacheRegion(String cacheRegion)
Set the name of the cache region in which to store this query result set ifcaching is enabled
.default Mutiny.Query<R>
setCacheRetrieveMode(jakarta.persistence.CacheRetrieveMode cacheRetrieveMode)
Set the currentCacheRetrieveMode
in effect while this query is being executed.default Mutiny.Query<R>
setCacheStoreMode(jakarta.persistence.CacheStoreMode cacheStoreMode)
Set the currentCacheStoreMode
in effect while this query is being executed.Mutiny.Query<R>
setComment(String comment)
Set the comment for this query.Mutiny.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 Mutiny.Query<R>
setFlushMode(jakarta.persistence.FlushModeType flushModeType)
Set the currentFlushModeType
in effect while this query is being executed.Mutiny.Query<R>
setFlushMode(FlushMode flushMode)
Set the currentFlushMode
in effect while this query is being executed.default Mutiny.Query<R>
setLockMode(jakarta.persistence.LockModeType lockModeType)
Set theLockModeType
to use for the whole query.default Mutiny.Query<R>
setLockMode(String alias, jakarta.persistence.LockModeType lockModeType)
Set theLockModeType
to use for specified alias (as defined in the query'sfrom
clause).Mutiny.Query<R>
setLockMode(String alias, LockMode lockMode)
Set theLockMode
to use for specified alias (as defined in the query'sfrom
clause).Mutiny.Query<R>
setLockMode(LockMode lockMode)
Set theLockMode
to use for the whole query.Mutiny.Query<R>
setMaxResults(int maxResults)
Set the maximum number of results that may be returned by this query when executed.Mutiny.Query<R>
setParameter(int parameter, Object argument)
Set the value of an ordinal parameter.<T> Mutiny.Query<R>
setParameter(jakarta.persistence.Parameter<T> parameter, T argument)
Set the value of a typed parameter.Mutiny.Query<R>
setParameter(String parameter, Object argument)
Set the value of a named parameter.Mutiny.Query<R>
setPlan(jakarta.persistence.EntityGraph<R> entityGraph)
Set theEntityGraph
that will be used as a fetch plan for the root entity returned by this query.Mutiny.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.mutiny.Mutiny.AbstractQuery
getComment
-
Methods inherited from interface org.hibernate.reactive.mutiny.Mutiny.MutationQuery
executeUpdate
-
Methods inherited from interface org.hibernate.reactive.mutiny.Mutiny.SelectionQuery
getCacheMode, getCacheRegion, getCacheRetrieveMode, getCacheStoreMode, getFirstResult, getFlushMode, getMaxResults, getResultList, getSingleResult, getSingleResultOrNull, isCacheable, isReadOnly, setOrder, setOrder, setPage
-
-
-
-
Method Detail
-
setMaxResults
Mutiny.Query<R> setMaxResults(int maxResults)
Description copied from interface:Mutiny.SelectionQuery
Set the maximum number of results that may be returned by this query when executed.- Specified by:
setMaxResults
in interfaceMutiny.SelectionQuery<R>
-
setFirstResult
Mutiny.Query<R> setFirstResult(int firstResult)
Description copied from interface:Mutiny.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 interfaceMutiny.SelectionQuery<R>
-
setReadOnly
Mutiny.Query<R> setReadOnly(boolean readOnly)
Description copied from interface:Mutiny.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 interfaceMutiny.SelectionQuery<R>
- See Also:
Mutiny.Session.setDefaultReadOnly(boolean)
-
setCacheable
Mutiny.Query<R> setCacheable(boolean cacheable)
Description copied from interface:Mutiny.SelectionQuery
Enable or disable caching of this query result set in the second-level query cache.- Specified by:
setCacheable
in interfaceMutiny.SelectionQuery<R>
- Parameters:
cacheable
-true
if this query is cacheable
-
setCacheRegion
Mutiny.Query<R> setCacheRegion(String cacheRegion)
Description copied from interface:Mutiny.SelectionQuery
Set the name of the cache region in which to store this query result set ifcaching is enabled
.- Specified by:
setCacheRegion
in interfaceMutiny.SelectionQuery<R>
- Parameters:
cacheRegion
- the name of the cache region
-
setCacheMode
Mutiny.Query<R> setCacheMode(CacheMode cacheMode)
Description copied from interface:Mutiny.SelectionQuery
Set the currentCacheMode
in effect while this query is being executed.- Specified by:
setCacheMode
in interfaceMutiny.SelectionQuery<R>
-
setCacheStoreMode
default Mutiny.Query<R> setCacheStoreMode(jakarta.persistence.CacheStoreMode cacheStoreMode)
Description copied from interface:Mutiny.SelectionQuery
Set the currentCacheStoreMode
in effect while this query is being executed.- Specified by:
setCacheStoreMode
in interfaceMutiny.SelectionQuery<R>
-
setCacheRetrieveMode
default Mutiny.Query<R> setCacheRetrieveMode(jakarta.persistence.CacheRetrieveMode cacheRetrieveMode)
Description copied from interface:Mutiny.SelectionQuery
Set the currentCacheRetrieveMode
in effect while this query is being executed.- Specified by:
setCacheRetrieveMode
in interfaceMutiny.SelectionQuery<R>
-
setFlushMode
Mutiny.Query<R> setFlushMode(FlushMode flushMode)
Description copied from interface:Mutiny.SelectionQuery
Set the currentFlushMode
in effect while this query is being executed.- Specified by:
setFlushMode
in interfaceMutiny.SelectionQuery<R>
-
setFlushMode
default Mutiny.Query<R> setFlushMode(jakarta.persistence.FlushModeType flushModeType)
Description copied from interface:Mutiny.SelectionQuery
Set the currentFlushModeType
in effect while this query is being executed.- Specified by:
setFlushMode
in interfaceMutiny.SelectionQuery<R>
-
setLockMode
Mutiny.Query<R> setLockMode(LockMode lockMode)
Description copied from interface:Mutiny.SelectionQuery
Set theLockMode
to use for the whole query.- Specified by:
setLockMode
in interfaceMutiny.SelectionQuery<R>
-
setLockMode
default Mutiny.Query<R> setLockMode(jakarta.persistence.LockModeType lockModeType)
Description copied from interface:Mutiny.SelectionQuery
Set theLockModeType
to use for the whole query.- Specified by:
setLockMode
in interfaceMutiny.SelectionQuery<R>
-
setLockMode
Mutiny.Query<R> setLockMode(String alias, LockMode lockMode)
Description copied from interface:Mutiny.SelectionQuery
Set theLockMode
to use for specified alias (as defined in the query'sfrom
clause).- Specified by:
setLockMode
in interfaceMutiny.SelectionQuery<R>
- Parameters:
alias
- the from clause aliaslockMode
- the requestedLockMode
- See Also:
Query.setLockMode(String,LockMode)
-
setLockMode
default Mutiny.Query<R> setLockMode(String alias, jakarta.persistence.LockModeType lockModeType)
Description copied from interface:Mutiny.SelectionQuery
Set theLockModeType
to use for specified alias (as defined in the query'sfrom
clause).- Specified by:
setLockMode
in interfaceMutiny.SelectionQuery<R>
- Parameters:
alias
- the from clause aliaslockModeType
- the requestedLockModeType
- See Also:
Query.setLockMode(String,LockMode)
-
setPlan
Mutiny.Query<R> setPlan(jakarta.persistence.EntityGraph<R> entityGraph)
Description copied from interface:Mutiny.SelectionQuery
Set theEntityGraph
that will be used as a fetch plan for the root entity returned by this query.- Specified by:
setPlan
in interfaceMutiny.SelectionQuery<R>
-
setParameter
Mutiny.Query<R> setParameter(int parameter, Object argument)
Description copied from interface:Mutiny.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 interfaceMutiny.AbstractQuery
- Specified by:
setParameter
in interfaceMutiny.MutationQuery
- Specified by:
setParameter
in interfaceMutiny.SelectionQuery<R>
- Parameters:
parameter
- an integer identifying the ordinal parameterargument
- the argument to set
-
setParameter
Mutiny.Query<R> setParameter(String parameter, Object argument)
Description copied from interface:Mutiny.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 interfaceMutiny.AbstractQuery
- Specified by:
setParameter
in interfaceMutiny.MutationQuery
- Specified by:
setParameter
in interfaceMutiny.SelectionQuery<R>
- Parameters:
parameter
- the name of the parameterargument
- the argument to set
-
setParameter
<T> Mutiny.Query<R> setParameter(jakarta.persistence.Parameter<T> parameter, T argument)
Description copied from interface:Mutiny.AbstractQuery
Set the value of a typed parameter. Typed parameters are obtained from the JPACriteriaBuilder
, which may itself be obtained by callingMutiny.SessionFactory.getCriteriaBuilder()
.- Specified by:
setParameter
in interfaceMutiny.AbstractQuery
- Specified by:
setParameter
in interfaceMutiny.MutationQuery
- Specified by:
setParameter
in interfaceMutiny.SelectionQuery<R>
- Parameters:
parameter
- the parameterargument
- the argument to set- See Also:
CriteriaBuilder.parameter(Class)
-
setComment
Mutiny.Query<R> setComment(String comment)
Description copied from interface:Mutiny.AbstractQuery
Set the comment for this query. This comment will be prepended to the SQL query sent to the database.- Specified by:
setComment
in interfaceMutiny.AbstractQuery
- Specified by:
setComment
in interfaceMutiny.MutationQuery
- Specified by:
setComment
in interfaceMutiny.SelectionQuery<R>
- Parameters:
comment
- The human-readable comment
-
enableFetchProfile
Mutiny.Query<R> enableFetchProfile(String profileName)
Description copied from interface:Mutiny.SelectionQuery
Enable a fetch profile which will be in effect during execution of this query.- Specified by:
enableFetchProfile
in interfaceMutiny.SelectionQuery<R>
-
-