]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
implemented business method for fetching all user activity log
authorRoland Häder <roland@mxchange.org>
Thu, 25 Aug 2016 07:31:17 +0000 (09:31 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 27 Aug 2016 14:42:01 +0000 (16:42 +0200)
src/java/org/mxchange/jusercore/model/user/activity/PizzaUserActivitySessionBean.java

index 6d0de6db43d98d4a16e5883b1155c51a4211b6db..a2b7be9ec233afe49dfa06d0cfde90dcc6d2225c 100644 (file)
@@ -42,6 +42,25 @@ public class PizzaUserActivitySessionBean extends BasePizzaDatabaseBean implemen
        public PizzaUserActivitySessionBean () {
        }
 
+       @Override
+       @SuppressWarnings ("unchecked")
+       public List<LogableUserActivity> fetchAllUserActivityLog () {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fetchAllUserActivityLog: CALLED!", this.getClass().getSimpleName())); //NOI18N
+
+               // Search for user's activity
+               Query query = this.getEntityManager().createNamedQuery("AllUserActivityLog", UserActivityLog.class); //NOI18N
+
+               // Get list
+               List<LogableUserActivity> list = query.getResultList();
+
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fetchAllUserActivityLog: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N
+
+               // Return it
+               return list;
+       }
+
        @Override
        @SuppressWarnings ("unchecked")
        public List<LogableUserActivity> fetchAllUsersActivityLog (final User user) {