]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
added business method allUsers() + updated jar(s)
authorRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 17:35:43 +0000 (19:35 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 17:44:37 +0000 (19:44 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java

index 680a2a74e7d108e22e1a232af8d204d2e6f9578e..28aae3b69bb3bd3346f6ecfce16fb237b8770c44 100644 (file)
@@ -98,6 +98,25 @@ public class JobsUserSessionBean extends BaseDatabaseBean implements UserSession
                return users;
        }
 
+       @Override
+       @SuppressWarnings ("unchecked")
+       public List<User> allUsers () {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace("allUsers: CALLED!"); //NOI18N
+
+               // Get named query
+               Query query = this.getEntityManager().createNamedQuery("allUsers", List.class); //NOI18N
+
+               // Get result
+               List<User> 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