13
13
14
14
15
15
/**
16
- * Access to known information about the parameters for a query.
16
+ * Information about the {@linkplain QueryParameter parameters}
17
+ * of a {@linkplain CommonQueryContract query}.
17
18
*
18
19
* @author Steve Ebersole
20
+ *
21
+ * @see CommonQueryContract#getParameterMetadata()
19
22
*/
20
23
@ Incubating
21
24
public interface ParameterMetadata {
@@ -36,7 +39,8 @@ public interface ParameterMetadata {
36
39
int getParameterCount ();
37
40
38
41
/**
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.
40
44
*
41
45
* @return The registered match, or {@code null} is there is no match
42
46
*
@@ -45,16 +49,18 @@ public interface ParameterMetadata {
45
49
QueryParameter <?> findQueryParameter (String name );
46
50
47
51
/**
48
- * Get the QueryParameter reference registered here under the given name.
52
+ * Get the {@linkplain QueryParameter parameter reference} registered
53
+ * under the given name.
49
54
*
50
- * @return The registered match. Never {@code null}
55
+ * @return The registered match. Never {@code null}
51
56
*
52
57
* @throws IllegalArgumentException if no parameter is registered under that name
53
58
*/
54
59
QueryParameter <?> getQueryParameter (String name );
55
60
56
61
/**
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.
58
64
*
59
65
* @return The registered match, or {@code null} is there is no match
60
66
*
@@ -63,23 +69,27 @@ public interface ParameterMetadata {
63
69
QueryParameter <?> findQueryParameter (int positionLabel );
64
70
65
71
/**
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.
67
74
*
68
- * @return The registered match. Never {@code null}
75
+ * @return The registered match. Never {@code null}
69
76
*
70
77
* @throws IllegalArgumentException if no parameter is registered under that position-label
71
78
*/
72
79
QueryParameter <?> getQueryParameter (int positionLabel );
73
80
74
81
/**
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} .
77
84
*
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.
80
87
*/
81
88
<P > QueryParameter <P > resolve (Parameter <P > param );
82
89
90
+ /**
91
+ * Get the type of the given parameter.
92
+ */
83
93
<T > BindableType <T > getInferredParameterType (QueryParameter <T > parameter );
84
94
85
95
/**
@@ -123,5 +133,10 @@ public interface ParameterMetadata {
123
133
*/
124
134
boolean hasPositionalParameters ();
125
135
136
+ /**
137
+ * Get the position labels of all positional parameters.
138
+ *
139
+ * @return the position labels
140
+ */
126
141
Set <Integer > getOrdinalParameterLabels ();
127
142
}
0 commit comments