From 84ab5b4798a33cee07b3a405c678fe3afb965270 Mon Sep 17 00:00:00 2001 From: Artur Date: Sun, 19 Jan 2025 09:41:25 +0200 Subject: [PATCH 1/3] Revert "chore: Add convenience list and count without Filter (#20867)" This reverts commit 7d13de2ba7e8f4db531509b146dc531cb821ea07. --- .../com/vaadin/flow/spring/data/CountService.java | 11 +---------- .../com/vaadin/flow/spring/data/ListService.java | 12 ------------ 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java b/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java index 8bc1294f3b3..8105ea82da5 100644 --- a/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java +++ b/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java @@ -9,15 +9,6 @@ */ public interface CountService { - /** - * Counts the number of items, without any filtering. - * - * @return the number of items in the service - */ - default long count() { - return count(null); - } - /** * Counts the number of items that match the given filter. * @@ -25,6 +16,6 @@ default long count() { * the filter, or {@code null} to use no filter * @return the number of items in the service that match the filter */ - long count(@Nullable Filter filter); + public long count(@Nullable Filter filter); } diff --git a/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/ListService.java b/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/ListService.java index 88d85788aba..237efd7afb6 100644 --- a/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/ListService.java +++ b/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/ListService.java @@ -14,18 +14,6 @@ * the type of object to list */ public interface ListService { - /** - * Lists objects of the given type using the paging and sorting options - * provided in the parameters. - * - * @param pageable - * contains information about paging and sorting - * @return a list of objects or an empty list if no objects were found - */ - default List list(Pageable pageable) { - return list(pageable, null); - } - /** * Lists objects of the given type using the paging, sorting and filtering * options provided in the parameters. From 8aa1da39fdfb87ba9b5a7898f3b75c18d274e8b2 Mon Sep 17 00:00:00 2001 From: Artur Date: Mon, 20 Jan 2025 09:26:49 +0200 Subject: [PATCH 2/3] Update vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com> --- .../src/main/java/com/vaadin/flow/spring/data/CountService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java b/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java index 8105ea82da5..b2c2a4115e0 100644 --- a/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java +++ b/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java @@ -16,6 +16,6 @@ public interface CountService { * the filter, or {@code null} to use no filter * @return the number of items in the service that match the filter */ - public long count(@Nullable Filter filter); + long count(@Nullable Filter filter); } From 12399b4faeaa8711233afa31038685add987479a Mon Sep 17 00:00:00 2001 From: Artur Date: Mon, 20 Jan 2025 09:27:03 +0200 Subject: [PATCH 3/3] Update CountService.java --- .../src/main/java/com/vaadin/flow/spring/data/CountService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java b/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java index b2c2a4115e0..3e9767f8bd3 100644 --- a/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java +++ b/vaadin-spring/src/main/java/com/vaadin/flow/spring/data/CountService.java @@ -16,6 +16,6 @@ public interface CountService { * the filter, or {@code null} to use no filter * @return the number of items in the service that match the filter */ - long count(@Nullable Filter filter); + long count(@Nullable Filter filter); }