From 8759ebfb2cb7c3791d11d39b13854840b0f2dd67 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 10 Apr 2016 19:35:43 +0200 Subject: [PATCH] added business method allUsers() + updated jar(s) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../user/AddressbookUserSessionBean.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java index 17d2498..ac39ca1 100644 --- a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java @@ -98,6 +98,25 @@ public class AddressbookUserSessionBean extends BaseDatabaseBean implements User return users; } + @Override + @SuppressWarnings ("unchecked") + public List allUsers () { + // Trace message + this.getLoggerBeanLocal().logTrace("allUsers: CALLED!"); //NOI18N + + // Get named query + Query query = this.getEntityManager().createNamedQuery("allUsers", List.class); //NOI18N + + // Get result + List users = query.getResultList(); + + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("allUsers: users.size()={0} - EXIT!", users.size())); //NOI18N + + // Return full list + return users; + } + @Override public User fillUserData (final User user) { // Trace message -- 2.39.5