|
21 | 21 | import java.util.List;
|
22 | 22 |
|
23 | 23 | import org.jspecify.annotations.Nullable;
|
24 |
| - |
25 | 24 | import org.springframework.core.ResolvableType;
|
26 | 25 | import org.springframework.core.annotation.MergedAnnotation;
|
27 | 26 | import org.springframework.core.annotation.MergedAnnotationSelectors;
|
@@ -50,8 +49,8 @@ public class AotQueryMethodGenerationContext {
|
50 | 49 | private final MethodMetadata targetMethodMetadata;
|
51 | 50 | private final VariableNameFactory variableNameFactory;
|
52 | 51 |
|
53 |
| - protected AotQueryMethodGenerationContext(RepositoryInformation repositoryInformation, Method method, QueryMethod queryMethod, |
54 |
| - AotRepositoryFragmentMetadata targetTypeMetadata) { |
| 52 | + protected AotQueryMethodGenerationContext(RepositoryInformation repositoryInformation, Method method, |
| 53 | + QueryMethod queryMethod, AotRepositoryFragmentMetadata targetTypeMetadata) { |
55 | 54 |
|
56 | 55 | this.method = method;
|
57 | 56 | this.annotations = MergedAnnotations.from(method);
|
@@ -270,45 +269,64 @@ public String localVariable(String variableName) {
|
270 | 269 | * @return the parameter name for the {@link org.springframework.data.domain.Sort sort parameter} or {@code null} if
|
271 | 270 | * the method does not declare a sort parameter.
|
272 | 271 | */
|
273 |
| - @Nullable |
274 |
| - public String getSortParameterName() { |
| 272 | + public @Nullable String getSortParameterName() { |
275 | 273 | return getParameterName(queryMethod.getParameters().getSortIndex());
|
276 | 274 | }
|
277 | 275 |
|
278 | 276 | /**
|
279 | 277 | * @return the parameter name for the {@link org.springframework.data.domain.Pageable pageable parameter} or
|
280 | 278 | * {@code null} if the method does not declare a pageable parameter.
|
281 | 279 | */
|
282 |
| - @Nullable |
283 |
| - public String getPageableParameterName() { |
| 280 | + public @Nullable String getPageableParameterName() { |
284 | 281 | return getParameterName(queryMethod.getParameters().getPageableIndex());
|
285 | 282 | }
|
286 | 283 |
|
287 | 284 | /**
|
288 | 285 | * @return the parameter name for the {@link org.springframework.data.domain.Limit limit parameter} or {@code null} if
|
289 | 286 | * the method does not declare a limit parameter.
|
290 | 287 | */
|
291 |
| - @Nullable |
292 |
| - public String getLimitParameterName() { |
| 288 | + public @Nullable String getLimitParameterName() { |
293 | 289 | return getParameterName(queryMethod.getParameters().getLimitIndex());
|
294 | 290 | }
|
295 | 291 |
|
296 | 292 | /**
|
297 | 293 | * @return the parameter name for the {@link org.springframework.data.domain.ScrollPosition scroll position parameter}
|
298 | 294 | * or {@code null} if the method does not declare a scroll position parameter.
|
299 | 295 | */
|
300 |
| - @Nullable |
301 |
| - public String getScrollPositionParameterName() { |
| 296 | + public @Nullable String getScrollPositionParameterName() { |
302 | 297 | return getParameterName(queryMethod.getParameters().getScrollPositionIndex());
|
303 | 298 | }
|
304 | 299 |
|
305 | 300 | /**
|
306 | 301 | * @return the parameter name for the {@link Class dynamic projection parameter} or {@code null} if the method does
|
307 | 302 | * not declare a dynamic projection parameter.
|
308 | 303 | */
|
309 |
| - @Nullable |
310 |
| - public String getDynamicProjectionParameterName() { |
| 304 | + public @Nullable String getDynamicProjectionParameterName() { |
311 | 305 | return getParameterName(queryMethod.getParameters().getDynamicProjectionIndex());
|
312 | 306 | }
|
313 | 307 |
|
| 308 | + /** |
| 309 | + * @return the parameter name for the {@link org.springframework.data.domain.Vector vector parameter} or {@code null} |
| 310 | + * if the method does not declare a vector type parameter. |
| 311 | + */ |
| 312 | + public @Nullable String getVectorParameterName() { |
| 313 | + return getParameterName(queryMethod.getParameters().getVectorIndex()); |
| 314 | + } |
| 315 | + |
| 316 | + /** |
| 317 | + * @return the parameter name for the {@link org.springframework.data.domain.Score score parameter} or {@code null} if |
| 318 | + * the method does not declare a score type parameter. |
| 319 | + */ |
| 320 | + public @Nullable String getScoreParameterName() { |
| 321 | + return getParameterName(queryMethod.getParameters().getScoreIndex()); |
| 322 | + } |
| 323 | + |
| 324 | + /** |
| 325 | + * @return the parameter name for the {@link org.springframework.data.domain.Range score range parameter} or |
| 326 | + * {@code null} if the method does not declare a score range type parameter. |
| 327 | + */ |
| 328 | + public @Nullable String getScoreRangeParameterName() { |
| 329 | + return getParameterName(queryMethod.getParameters().getScoreRangeIndex()); |
| 330 | + } |
| 331 | + |
314 | 332 | }
|
0 commit comments