From: Roland Haeder Date: Thu, 10 Mar 2016 19:09:47 +0000 (+0100) Subject: Continued a bit: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=afecb8e40ccbeb7fddec8948483c564018921c12;p=pizzaservice-mailer-ejb.git Continued a bit: - updated jar(s) - added missing business method (incomplete) --- diff --git a/lib/juser-lib.jar b/lib/juser-lib.jar index e9610b7..9324826 100644 Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ diff --git a/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java index 4795d84..8d1d8ac 100644 --- a/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java @@ -288,6 +288,32 @@ public class UserSessionBean extends BaseDatabaseBean implements UserSessionBean return true; } + @Override + public void updateEmailAddress (final User user) { + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateEmailAddress: user={0} - CALLED!", user)); + + // user should not be null + if (null == user) { + // Abort here + throw new NullPointerException("user is null"); //NOI18N + } else if (user.getUserId() == null) { + // Throw NPE again + throw new NullPointerException("user.userId is null"); //NOI18N + } else if (user.getUserId() < 1) { + // Not valid + throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid.", user.getUserId())); //NOI18N + } else if (user.getUserAccountStatus() == null) { + // Throw NPE again + throw new NullPointerException("user.userAccountStatus is null"); //NOI18N + } else if (!this.ifUserIdExists(user.getUserId())) { + // User does not exist + throw new PersistenceException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N + } + + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + @Override public void updateUserPersonalData (final User user) { // Trace message