Package org.hibernate.reactive.mutiny
Interface Mutiny.AbstractQuery
-
- All Known Subinterfaces:
Mutiny.MutationQuery
,Mutiny.Query<R>
,Mutiny.SelectionQuery<R>
- Enclosing interface:
- Mutiny
public static interface Mutiny.AbstractQuery
A non-blocking counterpart to the HibernateQuery
interface, allowing reactive execution of HQL and JPQL queries.The semantics of operations on this interface are identical to the semantics of the similarly-named operations of
Query
, except that the operations are performed asynchronously, returning aUni
without blocking the calling thread.Note that
TemporalType
is not supported as an argument for parameter bindings, and so parameters of typeDate
orCalendar
should not be used. Instead, datetime types fromjava.time
should be used as parameters.- See Also:
Query
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getComment()
Mutiny.AbstractQuery
setComment(String comment)
Set the comment for this query.Mutiny.AbstractQuery
setParameter(int parameter, Object argument)
Set the value of an ordinal parameter.<T> Mutiny.AbstractQuery
setParameter(jakarta.persistence.Parameter<T> parameter, T argument)
Set the value of a typed parameter.Mutiny.AbstractQuery
setParameter(String parameter, Object argument)
Set the value of a named parameter.
-
-
-
Method Detail
-
setParameter
Mutiny.AbstractQuery setParameter(int parameter, Object argument)
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.- Parameters:
parameter
- an integer identifying the ordinal parameterargument
- the argument to set
-
setParameter
Mutiny.AbstractQuery setParameter(String parameter, Object argument)
Set the value of a named parameter. Named parameters are specified in the query using placeholder tokens of form:name
.- Parameters:
parameter
- the name of the parameterargument
- the argument to set
-
setParameter
<T> Mutiny.AbstractQuery setParameter(jakarta.persistence.Parameter<T> parameter, T argument)
Set the value of a typed parameter. Typed parameters are obtained from the JPACriteriaBuilder
, which may itself be obtained by callingMutiny.SessionFactory.getCriteriaBuilder()
.- Parameters:
parameter
- the parameterargument
- the argument to set- See Also:
CriteriaBuilder.parameter(Class)
-
setComment
Mutiny.AbstractQuery setComment(String comment)
Set the comment for this query. This comment will be prepended to the SQL query sent to the database.- Parameters:
comment
- The human-readable comment
-
getComment
String getComment()
-
-