From: Roland Haeder Date: Sun, 10 Apr 2016 17:35:43 +0000 (+0200) Subject: added business method allUsers() + updated jar(s) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8759ebfb2cb7c3791d11d39b13854840b0f2dd67;p=addressbook-ejb.git added business method allUsers() + updated jar(s) Signed-off-by: Roland Häder --- 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