From e5b163fcb53f568f9feeee0f398d19664c64f47c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 20 May 2020 01:11:42 +0200 Subject: [PATCH] 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- src/org/mxchange/jusercore/model/user/LoginUser.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 { -- 2.39.5