2 * Copyright (C) 2016 - 2020 Free Software Foundation
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jusercore.model.user;
19 import java.text.MessageFormat;
20 import java.util.Date;
21 import java.util.List;
23 import javax.ejb.EJBException;
24 import javax.ejb.Stateless;
25 import javax.persistence.NoResultException;
26 import javax.persistence.PersistenceException;
27 import javax.persistence.Query;
28 import org.mxchange.jcontacts.model.contact.Contact;
29 import org.mxchange.jcontacts.model.contact.Contacts;
30 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
31 import org.mxchange.jphone.model.phonenumbers.fax.FaxNumbers;
32 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
33 import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumbers;
34 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
35 import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumbers;
36 import org.mxchange.jusercore.exceptions.UserNotFoundException;
37 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
38 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
39 import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException;
40 import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
41 import org.mxchange.jusercore.model.user.password_history.UserPasswordHistory;
42 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
43 import org.mxchange.juserlogincore.model.user.register.UserRegistrationSessionBeanRemote;
44 import org.mxchange.pizzaaplication.enterprise.BasePizzaEnterpriseBean;
49 * @author Roland Häder<roland@mxchange.org>
51 @Stateless (name = "user", description = "A bean handling the user data")
52 public class PizzaUserSessionBean extends BasePizzaEnterpriseBean implements UserSessionBeanRemote {
57 private static final long serialVersionUID = 542_145_347_916L;
63 private UserRegistrationSessionBeanRemote registerBean;
68 public PizzaUserSessionBean () {
69 // Call super constructor
70 super("jms/pizzaservice-queue-factory", "jms/pizzaservice-email-queue"); //NOI18N
74 @SuppressWarnings ("unchecked")
76 public List<String> allUserNames () {
78 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getUserNameList: CALLED!", this.getClass().getSimpleName())); //NOI18N
81 final Query query = this.getEntityManager().createNamedQuery("AllUserNames", String.class); //NOI18N
84 final List<String> userNameList = query.getResultList();
87 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getUserNameList: userNameList.size()={1} - EXIT!", this.getClass().getSimpleName(), userNameList.size())); //NOI18N
94 @SuppressWarnings ("unchecked")
95 public List<User> allUsers () {
97 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allUsers: CALLED!", this.getClass().getSimpleName())); //NOI18N
100 final Query query = this.getEntityManager().createNamedQuery("AllUsers", LoginUser.class); //NOI18N
103 final List<User> users = query.getResultList();
106 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allUsers: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N
113 public User confirmAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusLockedException {
115 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
117 // Parameter must be valid
120 throw new NullPointerException("user is null"); //NOI18N
121 } else if (user.getUserId() == null) {
123 throw new NullPointerException("user.userId is null"); //NOI18N
124 } else if (user.getUserId() < 1) {
126 throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
127 } else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) {
128 // Account is already confirmed
129 throw new UserStatusConfirmedException(user);
130 } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
131 // Account is already confirmed
132 throw new UserStatusLockedException(user);
133 } else if (user.getUserConfirmKey() == null) {
135 throw new NullPointerException("user.userConfirmKey is null"); //NOI18N
136 } else if (null == baseUrl) {
138 throw new NullPointerException("baseUrl is null"); //NOI18N
139 } else if (baseUrl.isEmpty()) {
141 throw new IllegalArgumentException("baseUrl is empty"); //NOI18N
144 // Update user account
145 final User managedUser = this.updateUserData(user);
147 // Update user status and remove confirmation key
148 managedUser.setUserAccountStatus(UserAccountStatus.CONFIRMED);
149 managedUser.setUserConfirmKey(null);
150 managedUser.setUserUpdated(new Date());
153 this.sendEmail("User account confirmed", "user_account_confirmed", managedUser, baseUrl, null); //NOI18N
156 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
158 // Return updated instance
164 public User fillUserData (final User user) throws UserNotFoundException {
166 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fillUserData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
168 // user should not be null
171 throw new NullPointerException("user is null"); //NOI18N
172 } else if (user.getUserName() == null) {
174 throw new NullPointerException("user.userName is null");
175 } else if (user.getUserName().isEmpty()) {
177 throw new IllegalArgumentException("user.userName is empty");
178 } else if (!this.ifUserExists(user)) {
179 // User does not exist
180 throw new UserNotFoundException(user);
184 final Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N
187 query.setParameter("userName", user.getUserName()); //NOI18N
189 // Initialize variable
190 final User foundUser;
194 // Try to get single result
195 foundUser = (User) query.getSingleResult();
196 } catch (final NoResultException ex) {
198 this.getLoggerBeanLocal().logException(ex);
203 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fillUserData: foundUser={1} - EXIT!", this.getClass().getSimpleName(), foundUser)); //NOI18N
205 // Return prepared instance
211 public String generateRandomUserName () {
213 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.generateRandomUserName - CALLED!", this.getClass().getSimpleName())); //NOI18N
216 final List<String> userList = this.allUserNames();
219 String userName = null;
221 // Loop until a user name is found
222 while ((userName == null) || (userList.contains(userName))) {
223 // Generate random name
224 userName = Users.generateRandomUserName();
228 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.generateRandomUserName: userName={1} - EXIT!", this.getClass().getSimpleName(), userName)); //NOI18N
230 // Found one, so return it
236 public boolean ifUserExists (final User user) {
238 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserExists: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
240 // userId should not be null
243 throw new NullPointerException("user is null"); //NOI18N
244 } else if (user.getUserId() == null) {
246 throw new NullPointerException("user.userId is null"); //NOI18N
247 } else if (user.getUserId() < 1) {
249 throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
253 final Query query = this.getEntityManager().createNamedQuery("SearchUserById", LoginUser.class); //NOI18N
256 query.setParameter("id", user.getUserId()); //NOI18N
260 // Try to get single result
261 final User dummy = (User) query.getSingleResult();
264 this.getLoggerBeanLocal().logDebug(MessageFormat.format("ifUserExists: dummy.userId={0} found.", dummy.getUserId())); //NOI18N
265 } catch (final NoResultException ex) {
267 this.getLoggerBeanLocal().logDebug(MessageFormat.format("ifUserExists: getSingleResult() returned no result: {0}", ex)); //NOI18N
269 // User name does not exist
271 } catch (final PersistenceException ex) {
272 // Something bad happened
273 this.getLoggerBeanLocal().logWarning(MessageFormat.format("More than one user {0} found.", user, ex)); //NOI18N
280 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserExists: Found user {1} - EXIT!", this.getClass().getSimpleName(), user)); //NOI18N
287 public boolean ifUserNameExists (final String userName) {
289 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserNameExists: userName={1} - CALLED!", this.getClass().getSimpleName(), userName)); //NOI18N
291 // userId should not be null
292 if (null == userName) {
294 throw new NullPointerException("userName is null"); //NOI18N
295 } else if (userName.isEmpty()) {
297 throw new NullPointerException("userName is empty"); //NOI18N
301 final Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N
304 query.setParameter("userName", userName); //NOI18N
308 // Try to get single result
309 final User dummy = (User) query.getSingleResult();
312 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserNameExists: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
313 } catch (final NoResultException ex) {
315 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserNameExists: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
317 // User name does not exist
322 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserNameExists: Found userName={1} - EXIT!", this.getClass().getSimpleName(), userName)); //NOI18N
329 public boolean isEmailAddressRegistered (final User user) {
331 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
333 // user should not be null
336 throw new NullPointerException("user is null"); //NOI18N
340 final Query query = this.getEntityManager().createNamedQuery("SearchUserByEmailAddress", LoginUser.class); //NOI18N
343 query.setParameter("emailAddress", user.getUserContact().getContactEmailAddress()); //NOI18N
347 // Try to get single result
348 final User dummy = (User) query.getSingleResult();
351 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isEmailAddressRegistered: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
352 } catch (final NoResultException ex) {
354 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isEmailAddressRegistered: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
356 // Email address does not exist
358 } catch (final PersistenceException ex) {
359 // Something bad happened
360 this.getLoggerBeanLocal().logWarning(MessageFormat.format("More than one email address {0} found.", user.getUserContact().getContactEmailAddress()), ex); //NOI18N
367 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: Returning true ... - EXIT!", this.getClass().getSimpleName())); //NOI18N
374 public boolean isUserNameRegistered (final User user) {
376 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
378 // user should not be null
381 throw new NullPointerException("user is null"); //NOI18N
385 final Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N
388 query.setParameter("userName", user.getUserName()); //NOI18N
392 // Try to get single result
393 final User dummy = (User) query.getSingleResult();
396 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isUserNameRegistered: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
397 } catch (final NoResultException ex) {
399 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isUserNameRegistered: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
401 // User name does not exist
403 } catch (final PersistenceException ex) {
404 // Something bad happened
405 this.getLoggerBeanLocal().logWarning(MessageFormat.format("More than one email address {0} found.", user.getUserContact().getContactEmailAddress()), ex); //NOI18N
412 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: Returning true ... - EXIT!", this.getClass().getSimpleName())); //NOI18N
419 public User updateUserData (final User detachedUser) {
421 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: detachedUser={1} - CALLED!", this.getClass().getSimpleName(), detachedUser)); //NOI18N
423 // user should not be null
424 if (null == detachedUser) {
426 throw new NullPointerException("detachedUser is null"); //NOI18N
427 } else if (detachedUser.getUserId() == null) {
429 throw new NullPointerException("detachedUser.userId is null"); //NOI18N
430 } else if (detachedUser.getUserId() < 1) {
432 throw new IllegalArgumentException(MessageFormat.format("detachedUser.userId={0} is not valid", detachedUser.getUserId())); //NOI18N
433 } else if (detachedUser.getUserAccountStatus() == null) {
435 throw new NullPointerException("detachedUser.userAccountStatus is null"); //NOI18N
436 } else if (!this.ifUserExists(detachedUser)) {
437 // User does not exist
438 throw new EJBException(MessageFormat.format("User with id {0} does not exist.", detachedUser.getUserId())); //NOI18N
442 final User foundUser = this.getEntityManager().find(detachedUser.getClass(), detachedUser.getUserId());
445 assert (foundUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", detachedUser.getUserId()); //NOI18N
448 final User managedUser = this.getEntityManager().merge(foundUser);
451 assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not merged, but should be.", managedUser.getUserId()); //NOI18N
454 Users.copyAll(detachedUser, managedUser);
457 managedUser.setUserUpdated(new Date());
460 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
462 // Return updated instance
467 public PasswordHistory updateUserPassword (final User user, final String baseUrl) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException {
469 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
471 // user should not be null
474 throw new NullPointerException("user is null"); //NOI18N
475 } else if (user.getUserId() == null) {
477 throw new NullPointerException("user.userId is null"); //NOI18N
478 } else if (user.getUserId() < 1) {
480 throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid.", user.getUserId())); //NOI18N
481 } else if (user.getUserName() == null) {
483 throw new NullPointerException("user.userName is null"); //NOI18N
484 } else if (user.getUserName().isEmpty()) {
486 throw new IllegalArgumentException("user.userName is empty"); //NOI18N
487 } else if (user.getUserAccountStatus() == null) {
489 throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
490 } else if (user.getUserContact() == null) {
492 throw new NullPointerException("user.userContact is null"); //NOI18N
493 } else if (user.getUserContact().getContactId() == null) {
495 throw new NullPointerException("user.userContact.contactId is null"); //NOI18N
496 } else if (user.getUserContact().getContactId() < 1) {
498 throw new IllegalArgumentException(MessageFormat.format("user.userContact.contactId={0} is invalid", user.getUserContact().getContactId())); //NOI18N
499 } else if (user.getUserContact().getContactPersonalTitle() == null) {
501 throw new NullPointerException("user.userContact.contactPersonalTitle is null"); //NOI18N
502 } else if (!this.ifUserExists(user)) {
503 // User does not exist
504 throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
505 } else if (null == baseUrl) {
507 throw new NullPointerException("baseUrl is null"); //NOI18N
508 } else if (baseUrl.isEmpty()) {
510 throw new IllegalArgumentException("baseUrl is empty"); //NOI18N
514 final User managedUser = this.updateUserData(user);
516 // Update user account
517 managedUser.setUserUpdated(new Date());
519 // Create history entry
520 PasswordHistory entry = new UserPasswordHistory(user.getUserEncryptedPassword(), managedUser);
522 // Set created timestamp
523 entry.setUserPasswordHistoryCreated(new Date());
525 // Merge user to make sure it is not re-persisted
526 final User mergedUser = this.getEntityManager().merge(managedUser);
527 entry.setUserPasswordHistoryUser(mergedUser);
530 this.getEntityManager().persist(entry);
532 // Send email to user
533 this.sendEmail("User password change", "user_password_change", managedUser, baseUrl, null); //NOI18N
536 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: entry.userPasswordHistoryId={1} - EXIT!", this.getClass().getSimpleName(), entry.getUserPasswordHistoryId())); //NOI18N
543 public User updateUserPersonalData (final User user) {
545 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
547 // user should not be null
550 throw new NullPointerException("user is null"); //NOI18N
551 } else if (user.getUserId() == null) {
553 throw new NullPointerException("user.userId is null"); //NOI18N
554 } else if (user.getUserId() < 1) {
556 throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
557 } else if (user.getUserAccountStatus() == null) {
559 throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
560 } else if (!this.ifUserExists(user)) {
561 // User does not exist
562 throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
566 final User managedUser = this.getEntityManager().find(user.getClass(), user.getUserId());
569 assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
572 Users.copyAll(user, managedUser);
575 managedUser.setUserUpdated(new Date());
576 managedUser.getUserContact().setContactUpdated(new Date());
578 // Get contact from it and find it
579 final Contact foundContact = this.getEntityManager().find(managedUser.getUserContact().getClass(), managedUser.getUserContact().getContactId());
582 assert (foundContact instanceof Contact) : MessageFormat.format("Contact with id {0} not found, but should be.", user.getUserContact().getContactId()); //NOI18N
585 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: contact.contactId={0}", foundContact.getContactId())); //NOI18N
587 // Merge contact instance
588 final Contact managedContact = this.getEntityManager().merge(foundContact);
591 Contacts.copyAll(managedUser.getUserContact(), managedContact);
593 // Set it back in user
594 user.setUserContact(managedContact);
597 assert (managedContact instanceof Contact) : MessageFormat.format("Contact with id {0} not merged, but should be.", user.getUserContact().getContactId()); //NOI18N
599 // Get mobile instance
600 final DialableMobileNumber mobileNumber = managedContact.getContactMobileNumber();
602 // Is there a mobile instance set?
603 if (mobileNumber instanceof DialableMobileNumber) {
605 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobile.phoneId={0} is being updated ...", mobileNumber.getPhoneId())); //NOI18N
608 final DialableMobileNumber foundMobile = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getPhoneId());
611 assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getPhoneId()); //NOI18N
613 // Then merge it, too
614 final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile);
617 assert (managedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", managedMobile.getPhoneId()); //NOI18N
620 MobileNumbers.copyAll(managedUser.getUserContact().getContactMobileNumber(), managedMobile);
623 managedContact.setContactMobileNumber(this.createManaged(mobileNumber, mobileNumber));
626 // Get mobile instance
627 final DialableFaxNumber faxNumber = managedContact.getContactFaxNumber();
629 // Is there a fax instance set?
630 if (faxNumber instanceof DialableFaxNumber) {
632 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: faxNumber.phoneId={0} is being updated ...", faxNumber.getPhoneId())); //NOI18N
635 final DialableFaxNumber foundFax = this.getEntityManager().find(faxNumber.getClass(), faxNumber.getPhoneId());
638 assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N
640 // Then merge it, too
641 final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax);
644 assert (managedFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", managedFax.getPhoneId()); //NOI18N
647 FaxNumbers.copyAll(managedUser.getUserContact().getContactFaxNumber(), managedFax);
650 managedContact.setContactFaxNumber(managedFax);
653 // Get mobile instance
654 final DialableLandLineNumber landLineNumber = managedContact.getContactLandLineNumber();
656 // Is there a fax instance set?
657 if (landLineNumber instanceof DialableLandLineNumber) {
659 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: landLineNumber.phoneId={0} is being updated ...", landLineNumber.getPhoneId())); //NOI18N
662 final DialableLandLineNumber foundLandLine = this.getEntityManager().find(landLineNumber.getClass(), landLineNumber.getPhoneId());
665 assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N
667 // Then merge it, too
668 final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine);
671 assert (managedLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", managedLandLine.getPhoneId()); //NOI18N
674 LandLineNumbers.copyAll(managedUser.getUserContact().getContactLandLineNumber(), managedLandLine);
677 managedContact.setContactLandLineNumber(managedLandLine);
681 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: entry.managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
683 // Return updated user instance