* A generic user entity class
* <p>
* @author Roland Häder<roland@mxchange.org>
- * @todo Remove AllUserNames after cleanup of deprecations in EJB/JSF
*/
@Entity (name = "users")
@Table (
)
@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 {