Skip to content

Commit 8c1c97a

Browse files
committed
they're now "ordinal" not "positional" parameters
1 parent 946149e commit 8c1c97a

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/mutiny/Mutiny.java

+13-4
Original file line numberDiff line numberDiff line change
@@ -70,28 +70,37 @@ public interface Mutiny {
7070
interface Query<R> {
7171

7272
/**
73-
* Set the value of a positional parameter. Positional parameters
73+
* Set the value of an ordinal parameter. Ordinal parameters
7474
* are numbered from 1, and are specified in the query using
7575
* placeholder tokens of form {@code ?1}, {@code ?2}, etc.
76+
*
77+
* @param parameter an integer identifying the ordinal parameter
78+
* @param argument the argument to set
7679
*/
77-
Query<R> setParameter(int position, Object value);
80+
Query<R> setParameter(int parameter, Object argument);
7881

7982
/**
8083
* Set the value of a named parameter. Named parameters are
8184
* specified in the query using placeholder tokens of form
8285
* {@code :name}.
86+
*
87+
* @param parameter the name of the parameter
88+
* @param argument the argument to set
8389
*/
84-
Query<R> setParameter(String name, Object value);
90+
Query<R> setParameter(String parameter, Object argument);
8591

8692
/**
8793
* Set the value of a typed parameter. Typed parameters are
8894
* obtained from the JPA {@link CriteriaBuilder}, which may
8995
* itself be obtained by calling
9096
* {@link SessionFactory#getCriteriaBuilder()}.
9197
*
98+
* @param parameter the parameter
99+
* @param argument the argument to set
100+
*
92101
* @see CriteriaBuilder#parameter(Class)
93102
*/
94-
<T> Query<R> setParameter(Parameter<T> name, T value);
103+
<T> Query<R> setParameter(Parameter<T> parameter, T argument);
95104

96105
/**
97106
* Set the maximum number of results that may be returned by this

hibernate-reactive-core/src/main/java/org/hibernate/reactive/stage/Stage.java

+13-4
Original file line numberDiff line numberDiff line change
@@ -70,28 +70,37 @@ public interface Stage {
7070
interface Query<R> {
7171

7272
/**
73-
* Set the value of a positional parameter. Positional parameters
73+
* Set the value of an ordinal parameter. Ordinal parameters
7474
* are numbered from 1, and are specified in the query using
7575
* placeholder tokens of form {@code ?1}, {@code ?2}, etc.
76+
*
77+
* @param parameter an integer identifying the ordinal parameter
78+
* @param argument the argument to set
7679
*/
77-
Query<R> setParameter(int position, Object value);
80+
Query<R> setParameter(int parameter, Object argument);
7881

7982
/**
8083
* Set the value of a named parameter. Named parameters are
8184
* specified in the query using placeholder tokens of form
8285
* {@code :name}.
86+
*
87+
* @param parameter the name of the parameter
88+
* @param argument the argument to set
8389
*/
84-
Query<R> setParameter(String name, Object value);
90+
Query<R> setParameter(String parameter, Object argument);
8591

8692
/**
8793
* Set the value of a typed parameter. Typed parameters are
8894
* obtained from the JPA {@link CriteriaBuilder}, which may
8995
* itself be obtained by calling
9096
* {@link SessionFactory#getCriteriaBuilder()}.
9197
*
98+
* @param parameter the parameter
99+
* @param argument the argument to set
100+
*
92101
* @see CriteriaBuilder#parameter(Class)
93102
*/
94-
<T> Query<R> setParameter(Parameter<T> name, T value);
103+
<T> Query<R> setParameter(Parameter<T> parameter, T argument);
95104

96105
/**
97106
* Set the maximum number of results that may be returned by this

0 commit comments

Comments
 (0)