From 14db0a0ad3229704e0f4fc224431be26f00ba979 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 25 Aug 2016 09:31:17 +0200 Subject: [PATCH] implemented business method for fetching all user activity log --- .../PizzaUserActivitySessionBean.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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) { -- 2.39.5