From: Roland Häder Date: Thu, 1 Sep 2016 15:14:43 +0000 (+0200) Subject: Continued a bit: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7f512cd648edc2d1e07b309e0e67e426534ff763;p=juser-activity-core.git Continued a bit: - added named query FindAllActivityByType for searching all user activity by type (all users) - added named queries for multiple types + user --- 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")