Class StageMutationQueryImpl<T>
- java.lang.Object
-
- org.hibernate.reactive.stage.impl.StageMutationQueryImpl<T>
-
- All Implemented Interfaces:
Stage.AbstractQuery
,Stage.MutationQuery
public class StageMutationQueryImpl<T> extends java.lang.Object implements Stage.MutationQuery
-
-
Constructor Summary
Constructors Constructor Description StageMutationQueryImpl(ReactiveMutationQuery<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletionStage<java.lang.Integer>
executeUpdate()
Asynchronously execute this delete, update, or insert query, returning the updated row count.java.lang.String
getComment()
Stage.MutationQuery
setComment(java.lang.String comment)
Set the comment for this query.Stage.MutationQuery
setParameter(int position, java.lang.Object value)
Set the value of an ordinal parameter.<P> Stage.MutationQuery
setParameter(jakarta.persistence.Parameter<P> param, P value)
Set the value of a typed parameter.Stage.MutationQuery
setParameter(java.lang.String name, java.lang.Object value)
Set the value of a named parameter.
-
-
-
Constructor Detail
-
StageMutationQueryImpl
public StageMutationQueryImpl(ReactiveMutationQuery<T> delegate)
-
-
Method Detail
-
executeUpdate
public java.util.concurrent.CompletionStage<java.lang.Integer> executeUpdate()
Description copied from interface:Stage.MutationQuery
Asynchronously execute this delete, update, or insert query, returning the updated row count.- Specified by:
executeUpdate
in interfaceStage.MutationQuery
- Returns:
- the row count as an integer
- See Also:
Query.executeUpdate()
-
setParameter
public Stage.MutationQuery setParameter(java.lang.String name, java.lang.Object value)
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
- Parameters:
name
- the name of the parametervalue
- the argument to set
-
setParameter
public Stage.MutationQuery setParameter(int position, java.lang.Object value)
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
- Parameters:
position
- an integer identifying the ordinal parametervalue
- the argument to set
-
setParameter
public <P> Stage.MutationQuery setParameter(jakarta.persistence.Parameter<P> param, P value)
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
- Parameters:
param
- the parametervalue
- the argument to set- See Also:
CriteriaBuilder.parameter(Class)
-
getComment
public java.lang.String getComment()
- Specified by:
getComment
in interfaceStage.AbstractQuery
-
setComment
public Stage.MutationQuery setComment(java.lang.String comment)
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
- Parameters:
comment
- The human-readable comment
-
-