From: Roland Haeder Date: Fri, 16 Oct 2015 17:05:12 +0000 (+0200) Subject: Added named query for public and member-visible users. Members are logged-in users. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bc0fc7e067a214968752e59e52c747be5a1dc06f;p=juser-login-core.git Added named query for public and member-visible users. Members are logged-in users. --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 93eace8..c8a56c4 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -69,7 +69,8 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; @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 = "SearchAllUsersExcept", query = "SELECT u FROM users AS u WHERE u != :user ORDER BY u.userId ASC"), - @NamedQuery (name = "AllPublicUsers", query = "SELECT u FROM users AS u WHERE u.userAccountStatus = :status AND u.userProfileMode = :mode") + @NamedQuery (name = "AllPublicUsers", query = "SELECT u FROM users AS u WHERE u.userAccountStatus = :status AND u.userProfileMode = :mode ORDER BY u.userId ASC"), + @NamedQuery (name = "AllMemberPublicUsers", query = "SELECT u FROM users AS u WHERE u.userAccountStatus = :status AND u.userProfileMode IN (:public, :members) ORDER BY u.userId ASC") } ) public class LoginUser implements User {