Skip to content

Commit 3b43cfc

Browse files
committed
some polish to the javadoc for ParameterMetadata
1 parent 004de8a commit 3b43cfc

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

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

+26-11
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313

1414

1515
/**
16-
* Access to known information about the parameters for a query.
16+
* Information about the {@linkplain QueryParameter parameters}
17+
* of a {@linkplain CommonQueryContract query}.
1718
*
1819
* @author Steve Ebersole
20+
*
21+
* @see CommonQueryContract#getParameterMetadata()
1922
*/
2023
@Incubating
2124
public interface ParameterMetadata {
@@ -36,7 +39,8 @@ public interface ParameterMetadata {
3639
int getParameterCount();
3740

3841
/**
39-
* Find the QueryParameter registered under the given name, if one.
42+
* Find the {@linkplain QueryParameter parameter reference} registered
43+
* under the given name, if there is one.
4044
*
4145
* @return The registered match, or {@code null} is there is no match
4246
*
@@ -45,16 +49,18 @@ public interface ParameterMetadata {
4549
QueryParameter<?> findQueryParameter(String name);
4650

4751
/**
48-
* Get the QueryParameter reference registered here under the given name.
52+
* Get the {@linkplain QueryParameter parameter reference} registered
53+
* under the given name.
4954
*
50-
* @return The registered match. Never {@code null}
55+
* @return The registered match. Never {@code null}
5156
*
5257
* @throws IllegalArgumentException if no parameter is registered under that name
5358
*/
5459
QueryParameter<?> getQueryParameter(String name);
5560

5661
/**
57-
* Find the QueryParameter registered under the given position-label, if one.
62+
* Find the {@linkplain QueryParameter parameter reference} registered
63+
* at the given position-label, if there is one.
5864
*
5965
* @return The registered match, or {@code null} is there is no match
6066
*
@@ -63,23 +69,27 @@ public interface ParameterMetadata {
6369
QueryParameter<?> findQueryParameter(int positionLabel);
6470

6571
/**
66-
* Get the QueryParameter reference registered here under the given position-label.
72+
* Get the {@linkplain QueryParameter parameter reference} registered
73+
* at the given position-label.
6774
*
68-
* @return The registered match. Never {@code null}
75+
* @return The registered match. Never {@code null}
6976
*
7077
* @throws IllegalArgumentException if no parameter is registered under that position-label
7178
*/
7279
QueryParameter<?> getQueryParameter(int positionLabel);
7380

7481
/**
75-
* A deeper resolution attempt from a JPA parameter reference to Hibernate's
76-
* contract. Generally should return the same param reference.
82+
* Obtain a {@link QueryParameter} representing the same parameter as the
83+
* given JPA-standard {@link Parameter}.
7784
*
78-
* According to the spec, only Parameter references obtained from the provider
79-
* are valid.
85+
* @apiNote According to the spec, only {@link Parameter} references obtained
86+
* from the provider are valid.
8087
*/
8188
<P> QueryParameter<P> resolve(Parameter<P> param);
8289

90+
/**
91+
* Get the type of the given parameter.
92+
*/
8393
<T> BindableType<T> getInferredParameterType(QueryParameter<T> parameter);
8494

8595
/**
@@ -123,5 +133,10 @@ public interface ParameterMetadata {
123133
*/
124134
boolean hasPositionalParameters();
125135

136+
/**
137+
* Get the position labels of all positional parameters.
138+
*
139+
* @return the position labels
140+
*/
126141
Set<Integer> getOrdinalParameterLabels();
127142
}

0 commit comments

Comments
 (0)