From 1c8471c384656ec88441867fec666b7e6ee5d9e1 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Mon, 25 Mar 2024 15:34:44 +0100 Subject: [PATCH] Polishing. Related ticket GH-3066. --- .../data/repository/core/RepositoryInformation.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/springframework/data/repository/core/RepositoryInformation.java b/src/main/java/org/springframework/data/repository/core/RepositoryInformation.java index 4e78c3868d..6cbf80e06f 100644 --- a/src/main/java/org/springframework/data/repository/core/RepositoryInformation.java +++ b/src/main/java/org/springframework/data/repository/core/RepositoryInformation.java @@ -86,6 +86,11 @@ default boolean hasCustomMethod() { return getQueryMethods().stream().anyMatch(this::isCustomMethod); } + /** + * Returns whether the configured repository interface has query methods at all. + * + * @return + */ default boolean hasQueryMethods() { return getQueryMethods().iterator().hasNext(); }