public class MutinyQueryImpl<R> extends Object implements Mutiny.Query<R>
Mutiny.Query
.Constructor and Description |
---|
MutinyQueryImpl(ReactiveQuery<R> delegate) |
Modifier and Type | Method and Description |
---|---|
<any> | executeUpdate() Asynchronously execute this delete, update, or insert query, returning the updated row count. |
CacheMode | getCacheMode() Obtain the CacheMode in effect for this query. |
String | getCacheRegion() |
int | getFirstResult() |
FlushMode | getFlushMode() Obtain the FlushMode in effect for this query. |
int | getMaxResults() |
<any> | getResultList() Asynchronously execute this query, returning the query results as a List , via a Uni . |
<any> | getSingleResult() Asynchronously execute this query, returning a single row that matches the query, or null if the query returns no results, throwing an exception if the query returns more than one matching row. |
boolean | isCacheable() |
boolean | isReadOnly() |
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 current CacheMode 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 if caching is enabled . |
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. |
Mutiny.Query<R> | setFlushMode(FlushMode flushMode) Set the current FlushMode in effect while this query is being executed. |
Mutiny.Query<R> | setLockMode(LockMode lockMode) Set the LockMode to use for the whole query. |
Mutiny.Query<R> | setLockMode(String alias, LockMode lockMode) Set the LockMode to use for specified alias (as defined in the query's from clause). |
Mutiny.Query<R> | setLockOptions(LockOptions lockOptions) |
Mutiny.Query<R> | setMaxResults(int maxResults) Set the maximum number of results that may be returned by this query when executed. |
<T> Mutiny.Query<R> | setParameter(<any> name, T value) Set the value of a typed parameter. |
Mutiny.Query<R> | setParameter(int position, Object value) Set the value of a positional parameter. |
Mutiny.Query<R> | setParameter(String name, Object value) Set the value of a named parameter. |
Mutiny.Query<R> | setReadOnly(boolean readOnly) Set the read-only/modifiable mode for entities and proxies loaded by this Query. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResults
public MutinyQueryImpl(ReactiveQuery<R> delegate)
public Mutiny.Query<R> setParameter(int position, Object value)
Mutiny.Query
?1
, ?2
, etc.setParameter
in interface Mutiny.Query<R>
public Mutiny.Query<R> setParameter(String name, Object value)
Mutiny.Query
:name
.setParameter
in interface Mutiny.Query<R>
public <T> Mutiny.Query<R> setParameter(<any> name, T value)
Mutiny.Query
CriteriaBuilder
, which may itself be obtained by calling Mutiny.SessionFactory.getCriteriaBuilder()
.setParameter
in interface Mutiny.Query<R>
CriteriaBuilder#parameter(Class)
public Mutiny.Query<R> setMaxResults(int maxResults)
Mutiny.Query
setMaxResults
in interface Mutiny.Query<R>
public int getMaxResults()
getMaxResults
in interface Mutiny.Query<R>
Integer.MAX_VALUE
if not setpublic Mutiny.Query<R> setFirstResult(int firstResult)
Mutiny.Query
setFirstResult
in interface Mutiny.Query<R>
public int getFirstResult()
getFirstResult
in interface Mutiny.Query<R>
public Mutiny.Query<R> setReadOnly(boolean readOnly)
Mutiny.Query
setReadOnly
in interface Mutiny.Query<R>
Mutiny.Session.setDefaultReadOnly(boolean)
public boolean isReadOnly()
isReadOnly
in interface Mutiny.Query<R>
Mutiny.Session.isDefaultReadOnly()
public Mutiny.Query<R> setComment(String comment)
Mutiny.Query
setComment
in interface Mutiny.Query<R>
comment
- The human-readable commentpublic Mutiny.Query<R> setCacheable(boolean cacheable)
Mutiny.Query
setCacheable
in interface Mutiny.Query<R>
cacheable
- true
if this query is cacheablepublic boolean isCacheable()
isCacheable
in interface Mutiny.Query<R>
true
if this query is cacheableMutiny.Query.setCacheable(boolean)
public Mutiny.Query<R> setCacheRegion(String cacheRegion)
Mutiny.Query
caching is enabled
.setCacheRegion
in interface Mutiny.Query<R>
cacheRegion
- the name of the cache regionpublic String getCacheRegion()
getCacheRegion
in interface Mutiny.Query<R>
Mutiny.Query.setCacheRegion(String)
public Mutiny.Query<R> setLockMode(LockMode lockMode)
Mutiny.Query
LockMode
to use for the whole query.setLockMode
in interface Mutiny.Query<R>
public Mutiny.Query<R> setLockOptions(LockOptions lockOptions)
public Mutiny.Query<R> setLockMode(String alias, LockMode lockMode)
Mutiny.Query
LockMode
to use for specified alias (as defined in the query's from
clause).setLockMode
in interface Mutiny.Query<R>
alias
- the from clause aliaslockMode
- the requested LockMode
org.hibernate.query.Query#setLockMode(String,LockMode)
public Mutiny.Query<R> setCacheMode(CacheMode cacheMode)
Mutiny.Query
CacheMode
in effect while this query is being executed.setCacheMode
in interface Mutiny.Query<R>
public CacheMode getCacheMode()
Mutiny.Query
CacheMode
in effect for this query. By default, the query inherits the CacheMode
of the Mutiny.Session
from which is originates.getCacheMode
in interface Mutiny.Query<R>
Mutiny.Session.getCacheMode()
public Mutiny.Query<R> setFlushMode(FlushMode flushMode)
Mutiny.Query
FlushMode
in effect while this query is being executed.setFlushMode
in interface Mutiny.Query<R>
public FlushMode getFlushMode()
Mutiny.Query
FlushMode
in effect for this query. By default, the query inherits the FlushMode
of the Mutiny.Session
from which is originates.getFlushMode
in interface Mutiny.Query<R>
Mutiny.Session.getFlushMode()
public <any> executeUpdate()
Mutiny.Query
executeUpdate
in interface Mutiny.Query<R>
javax.persistence.Query#executeUpdate()
public <any> getSingleResult()
Mutiny.Query
null
if the query returns no results, throwing an exception if the query returns more than one matching row. If the query has multiple results per row, the results are returned in an instance of Object[]
.getSingleResult
in interface Mutiny.Query<R>
null
javax.persistence.Query#getSingleResult()
public <any> getResultList()
Mutiny.Query
List
, via a Uni
. If the query has multiple results per row, the results are returned in an instance of Object[]
. If the query has multiple results per row, the results are returned in an instance of Object[]
.getResultList
in interface Mutiny.Query<R>
List
javax.persistence.Query#getResultList()