|
19 | 19 |
|
20 | 20 | /** |
21 | 21 | * Defines the aspects of query execution and parameter binding that apply to all |
22 | | - * forms of querying: HQL/JPQL queries, native SQL queries, |
23 | | - * {@linkplain jakarta.persistence.criteria.CriteriaBuilder criteria queries}, and |
24 | | - * {@linkplain org.hibernate.procedure.ProcedureCall stored procedure calls}. |
| 22 | + * forms of querying: |
| 23 | + * <ul> |
| 24 | + * <li>queries written in HQL or JPQL, |
| 25 | + * <li>queries written in the native SQL dialect of the database, |
| 26 | + * <li>{@linkplain jakarta.persistence.criteria.CriteriaBuilder criteria queries}, |
| 27 | + * and |
| 28 | + * <li>{@linkplain org.hibernate.procedure.ProcedureCall stored procedure calls}. |
| 29 | + * </ul> |
25 | 30 | * <p> |
26 | 31 | * Queries may have <em>parameters</em>, either ordinal or named, and the various |
27 | 32 | * {@code setParameter()} operations of this interface allow an argument to be |
28 | 33 | * bound to a parameter. It's not usually necessary to explicitly specify the type |
29 | 34 | * of an argument, but in rare cases where this is needed, {@link TypedParameterValue} |
30 | 35 | * may be used. |
31 | 36 | * <p> |
32 | | - * The operation {@link #setFlushMode(FlushModeType)} allows a temporary flush |
| 37 | + * The operation {@link #setQueryFlushMode(QueryFlushMode)} allows a temporary flush |
33 | 38 | * mode to be specified, which is in effect only during the execution of this query. |
34 | | - * Setting the {@linkplain FlushMode flush mode} at the query level does not affect |
35 | | - * the flush mode of other operations performed via the parent {@linkplain Session |
36 | | - * session}. This operation is usually used as follows: |
| 39 | + * Setting the {@linkplain QueryFlushMode query flush mode} does not affect the flush |
| 40 | + * mode of other operations performed via the parent {@linkplain Session session}. |
| 41 | + * This operation is usually used as follows: |
37 | 42 | * <p> |
38 | | - * <pre>query.setFlushMode(COMMIT).getResultList()</pre> |
| 43 | + * <pre>query.setQueryFlushMode(NO_FLUSH).getResultList()</pre> |
39 | 44 | * <p> |
40 | | - * The call to {@code setFlushMode(COMMIT)} disables the usual automatic flush |
| 45 | + * The call to {@code setQueryFlushMode(NO_FLUSH)} disables the usual automatic flush |
41 | 46 | * operation that occurs before query execution. |
42 | 47 | * |
43 | 48 | * @author Steve Ebersole |
@@ -204,10 +209,13 @@ public interface CommonQueryContract { |
204 | 209 | * Bind the given argument to a named query parameter. |
205 | 210 | * <p> |
206 | 211 | * If the type of the parameter cannot be inferred from the context in |
207 | | - * which it occurs, use one of the forms which accepts a "type". |
| 212 | + * which it occurs, use one of the overloads which accepts a "type", |
| 213 | + * or pass a {@link TypedParameterValue}. |
208 | 214 | * |
209 | 215 | * @see #setParameter(String, Object, Class) |
210 | 216 | * @see #setParameter(String, Object, BindableType) |
| 217 | + * |
| 218 | + * @see TypedParameterValue |
211 | 219 | */ |
212 | 220 | CommonQueryContract setParameter(String parameter, Object value); |
213 | 221 |
|
@@ -255,11 +263,14 @@ public interface CommonQueryContract { |
255 | 263 | /** |
256 | 264 | * Bind the given argument to an ordinal query parameter. |
257 | 265 | * <p> |
258 | | - * If the type of the parameter cannot be inferred from the context in which |
259 | | - * it occurs, use one of the forms which accepts a "type". |
| 266 | + * If the type of the parameter cannot be inferred from the context in |
| 267 | + * which it occurs, use one of the overloads which accepts a "type", |
| 268 | + * or pass a {@link TypedParameterValue}. |
260 | 269 | * |
261 | 270 | * @see #setParameter(int, Object, Class) |
262 | 271 | * @see #setParameter(int, Object, BindableType) |
| 272 | + * |
| 273 | + * @see TypedParameterValue |
263 | 274 | */ |
264 | 275 | CommonQueryContract setParameter(int parameter, Object value); |
265 | 276 |
|
@@ -308,8 +319,8 @@ public interface CommonQueryContract { |
308 | 319 | * Bind an argument to the query parameter represented by the given |
309 | 320 | * {@link QueryParameter}. |
310 | 321 | * <p> |
311 | | - * If the type of the parameter cannot be inferred from the context in which |
312 | | - * it occurs, use one of the forms which accepts a "type". |
| 322 | + * If the type of the parameter cannot be inferred from the context in |
| 323 | + * which it occurs, use one of the overloads which accepts a "type". |
313 | 324 | * |
314 | 325 | * @see #setParameter(QueryParameter, Object, BindableType) |
315 | 326 | * |
|
0 commit comments