Skip to content

Commit b5eac3f

Browse files
committed
refresh javadoc for CommonQueryContract
1 parent eaeb0f3 commit b5eac3f

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

hibernate-core/src/main/java/org/hibernate/query/CommonQueryContract.java

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,30 @@
1919

2020
/**
2121
* 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>
2530
* <p>
2631
* Queries may have <em>parameters</em>, either ordinal or named, and the various
2732
* {@code setParameter()} operations of this interface allow an argument to be
2833
* bound to a parameter. It's not usually necessary to explicitly specify the type
2934
* of an argument, but in rare cases where this is needed, {@link TypedParameterValue}
3035
* may be used.
3136
* <p>
32-
* The operation {@link #setFlushMode(FlushModeType)} allows a temporary flush
37+
* The operation {@link #setQueryFlushMode(QueryFlushMode)} allows a temporary flush
3338
* 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:
3742
* <p>
38-
* <pre>query.setFlushMode(COMMIT).getResultList()</pre>
43+
* <pre>query.setQueryFlushMode(NO_FLUSH).getResultList()</pre>
3944
* <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
4146
* operation that occurs before query execution.
4247
*
4348
* @author Steve Ebersole
@@ -204,10 +209,13 @@ public interface CommonQueryContract {
204209
* Bind the given argument to a named query parameter.
205210
* <p>
206211
* 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}.
208214
*
209215
* @see #setParameter(String, Object, Class)
210216
* @see #setParameter(String, Object, BindableType)
217+
*
218+
* @see TypedParameterValue
211219
*/
212220
CommonQueryContract setParameter(String parameter, Object value);
213221

@@ -255,11 +263,14 @@ public interface CommonQueryContract {
255263
/**
256264
* Bind the given argument to an ordinal query parameter.
257265
* <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}.
260269
*
261270
* @see #setParameter(int, Object, Class)
262271
* @see #setParameter(int, Object, BindableType)
272+
*
273+
* @see TypedParameterValue
263274
*/
264275
CommonQueryContract setParameter(int parameter, Object value);
265276

@@ -308,8 +319,8 @@ public interface CommonQueryContract {
308319
* Bind an argument to the query parameter represented by the given
309320
* {@link QueryParameter}.
310321
* <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".
313324
*
314325
* @see #setParameter(QueryParameter, Object, BindableType)
315326
*

0 commit comments

Comments
 (0)