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=b52578faf24af9a63e75a2bcded116777c4957f2;p=jjobs-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/JobsUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java index 680a2a7..28aae3b 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java @@ -98,6 +98,25 @@ public class JobsUserSessionBean extends BaseDatabaseBean implements UserSession 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