From: Roland Haeder Date: Thu, 15 Oct 2015 06:41:31 +0000 (+0200) Subject: added named query for user lookup by its id number X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fbddece308d0dfea84bc44bcce4cfbe15e8bbe04;p=juser-activity-core.git added named query for user lookup by its id number Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index a3fa86d..d5d5803 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -65,6 +65,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; @NamedQuery (name = "AllUserNames", query = "SELECT DISTINCT u.userName FROM users AS u ORDER BY u.userId ASC"), @NamedQuery (name = "AllEmailAddresses", query = "SELECT DISTINCT c.contactEmailAddress FROM contacts AS c INNER JOIN users AS u ON u.userContact = c ORDER BY c.contactId ASC"), @NamedQuery (name = "SearchUserName", query = "SELECT u FROM users AS u WHERE LOWER(u.userName) LIKE LOWER(:param)"), + @NamedQuery (name = "SearchUserId", query = "SELECT u FROM users AS u WHERE u.userId = :id"), @NamedQuery (name = "SearchEmailAddress", query = "SELECT u FROM users AS u INNER JOIN contacts AS c ON u.userContact = c WHERE LOWER(c.contactEmailAddress) LIKE LOWER(:param)"), @NamedQuery (name = "AllPublicUsers", query = "SELECT u FROM users AS u WHERE u.userAccountStatus = :param AND u.userPublicProfile = TRUE") }