From 7fdd6045508c53adaa21f05bef02560135205831 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/PizzaAdminUserWebSessionBean.java | 5 +++++ .../beans/user/PizzaAdminUserWebSessionController.java | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java index 92af11c2..37dfe37b 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java @@ -447,6 +447,11 @@ public class PizzaAdminUserWebSessionBean implements PizzaAdminUserWebSessionCon this.zipCode = zipCode; } + @Override + public boolean hasUsers () { + return (!this.allUsers().isEmpty()); + } + /** * Post-initialization of this class */ diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionController.java index f2b25ad8..cb34c073 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionController.java @@ -52,6 +52,13 @@ public interface PizzaAdminUserWebSessionController extends Serializable { */ List allUsers (); + /** + * Checks whether users are registered + *

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

-- 2.39.5