From: Roland Haeder Date: Sun, 10 Apr 2016 17:57:28 +0000 (+0200) Subject: added hasUsers() which checks if users are registered. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7fdd6045508c53adaa21f05bef02560135205831;p=pizzaservice-war.git added hasUsers() which checks if users are registered. --- 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 *