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=14db0a0ad3229704e0f4fc224431be26f00ba979;p=pizzaservice-ejb.git implemented business method for fetching all user activity log --- diff --git a/src/java/org/mxchange/jusercore/model/user/activity/PizzaUserActivitySessionBean.java b/src/java/org/mxchange/jusercore/model/user/activity/PizzaUserActivitySessionBean.java index 6d0de6d..a2b7be9 100644 --- a/src/java/org/mxchange/jusercore/model/user/activity/PizzaUserActivitySessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/activity/PizzaUserActivitySessionBean.java @@ -42,6 +42,25 @@ public class PizzaUserActivitySessionBean extends BasePizzaDatabaseBean implemen public PizzaUserActivitySessionBean () { } + @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) {