From af58c8e7c4dd55c47afffa9e0ee7588a6e295295 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 10 Apr 2016 19:57:28 +0200 Subject: [PATCH] added hasUsers() which checks if users are registered. --- .../beans/user/AddressbookAdminUserWebSessionBean.java | 5 +++++ .../user/AddressbookAdminUserWebSessionController.java | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java index 4d6b19e1..86ef0aa7 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionBean.java @@ -447,6 +447,11 @@ public class AddressbookAdminUserWebSessionBean implements AddressbookAdminUserW this.zipCode = zipCode; } + @Override + public boolean hasUsers () { + return (!this.allUsers().isEmpty()); + } + /** * Post-initialization of this class */ diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java index 9b8ab0de..26b2fcc2 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebSessionController.java @@ -52,6 +52,13 @@ public interface AddressbookAdminUserWebSessionController extends Serializable { */ List allUsers (); + /** + * Checks whether users are registered + *

+ * @return Whether users are registered + */ + boolean hasUsers (); + /** * Getter for birth day *

-- 2.39.5