From: Roland Häder Date: Tue, 19 May 2020 23:11:42 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e5b163fcb53f568f9feeee0f398d19664c64f47c;p=juser-core.git Continued: - cleaned up old JPQL queries, you can fetch the whole list (high memory footprint but very performant) and do your custom checks on it 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 bf8c7ab..98d0f68 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -47,7 +47,6 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; * A generic user entity class *

* @author Roland Häder - * @todo Remove AllUserNames after cleanup of deprecations in EJB/JSF */ @Entity (name = "users") @Table ( @@ -55,12 +54,8 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; ) @NamedQueries ( { - @NamedQuery (name = "AllUserNames", query = "SELECT DISTINCT u.userName FROM users AS u ORDER BY u.userId ASC"), - @NamedQuery (name = "SearchUserByName", query = "SELECT u FROM users AS u WHERE LOWER(u.userName) LIKE LOWER(:userName)"), - @NamedQuery (name = "SearchUserByEmailAddress", query = "SELECT u FROM users AS u INNER JOIN contacts AS c ON u.userContact = c WHERE LOWER(c.contactEmailAddress) LIKE LOWER(:emailAddress)"), - @NamedQuery (name = "SearchUserByConfirmKey", query = "SELECT u FROM users AS u WHERE u.userConfirmKey = :confirmKey"), - @NamedQuery (name = "SearchAllUsersExcept", query = "SELECT u FROM users AS u WHERE u != :user ORDER BY u.userId ASC"), - @NamedQuery (name = "AllUsers", query = "SELECT u FROM users AS u ORDER BY u.userId ASC"),} + @NamedQuery (name = "AllUsers", query = "SELECT u FROM users AS u ORDER BY u.userId ASC") + } ) @SuppressWarnings ("PersistenceUnitPresent") public class LoginUser implements User {