From b831e50077db18338a0d8d37c92d3f51a6fde227 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. --- .../jjobs/beans/user/JobsAdminUserWebSessionBean.java | 5 +++++ .../beans/user/JobsAdminUserWebSessionController.java | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java index 20c93b78..a78551f1 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionBean.java @@ -447,6 +447,11 @@ public class JobsAdminUserWebSessionBean implements JobsAdminUserWebSessionContr this.zipCode = zipCode; } + @Override + public boolean hasUsers () { + return (!this.allUsers().isEmpty()); + } + /** * Post-initialization of this class */ diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionController.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionController.java index dfb13f21..24c2dca0 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebSessionController.java @@ -52,6 +52,13 @@ public interface JobsAdminUserWebSessionController extends Serializable { */ List allUsers (); + /** + * Checks whether users are registered + *

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

-- 2.39.5