From 7f512cd648edc2d1e07b309e0e67e426534ff763 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 1 Sep 2016 17:14:43 +0200 Subject: [PATCH] Continued a bit: - added named query FindAllActivityByType for searching all user activity by type (all users) - added named queries for multiple types + user --- .../jusercore/model/user/activity/UserActivityLog.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/mxchange/jusercore/model/user/activity/UserActivityLog.java b/src/org/mxchange/jusercore/model/user/activity/UserActivityLog.java index 4f02151..f89309a 100644 --- a/src/org/mxchange/jusercore/model/user/activity/UserActivityLog.java +++ b/src/org/mxchange/jusercore/model/user/activity/UserActivityLog.java @@ -54,7 +54,10 @@ import org.mxchange.jusercore.model.user.User; { @NamedQuery (name = "AllUserActivityLog", query = "SELECT a FROM user_activity_log AS a ORDER BY a.activityId DESC"), @NamedQuery (name = "FindAllUsersActivity", query = "SELECT a FROM user_activity_log AS a WHERE a.activityUser = :activityUser ORDER BY a.activityId DESC"), - @NamedQuery (name = "FindUsersActivityByType", query = "SELECT a FROM user_activity_log AS a WHERE a.activityUser = :activityUser AND a.activityType LIKE :activityType ORDER BY a.activityId DESC") + @NamedQuery (name = "FindAllActivityByType", query = "SELECT a FROM user_activity_log AS a WHERE a.activityType LIKE :activityType ORDER BY a.activityId DESC"), + @NamedQuery (name = "FindUsersActivityByType", query = "SELECT a FROM user_activity_log AS a WHERE a.activityUser = :activityUser AND a.activityType LIKE :activityType ORDER BY a.activityId DESC"), + @NamedQuery (name = "FindAllActivityByMultipleTypes", query = "SELECT a FROM user_activity_log AS a WHERE a.activityType IN :activityTypes ORDER BY a.activityId DESC"), + @NamedQuery (name = "FindUsersActivityByMultipleTypes", query = "SELECT a FROM user_activity_log AS a WHERE a.activityUser = :activityUser AND a.activityType IN :activityTypes ORDER BY a.activityId DESC") } ) @SuppressWarnings ("PersistenceUnitPresent") -- 2.39.5