]> git.mxchange.org Git - jjobs-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>
Sun, 28 Aug 2016 13:55:45 +0000 (15:55 +0200)
src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivitySessionBean.java

index 8d0ee4a10fd51ea8ec7a0a13292c080eeb25f2de..1ef750978a8415e29032d304a344cb775f914f70 100644 (file)
@@ -42,6 +42,25 @@ public class JobsUserActivitySessionBean extends BaseJobsDatabaseBean implements
        public JobsUserActivitySessionBean () {
        }
 
+       @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) {