From: Roland Häder Date: Thu, 25 Aug 2016 07:31:17 +0000 (+0200) Subject: implemented business method for fetching all user activity log X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3258bcb060eca7bb03952c01c188dc4bd5d501f1;p=jjobs-ejb.git implemented business method for fetching all user activity log --- diff --git a/src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivitySessionBean.java b/src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivitySessionBean.java index 8d0ee4a..1ef7509 100644 --- a/src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivitySessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/activity/JobsUserActivitySessionBean.java @@ -42,6 +42,25 @@ public class JobsUserActivitySessionBean extends BaseJobsDatabaseBean implements public JobsUserActivitySessionBean () { } + @Override + @SuppressWarnings ("unchecked") + public List 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 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 fetchAllUsersActivityLog (final User user) {