]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
Continued a bit:
authorRoland Haeder <roland@mxchange.org>
Thu, 10 Mar 2016 19:10:58 +0000 (20:10 +0100)
committerRoland Haeder <roland@mxchange.org>
Thu, 10 Mar 2016 19:10:58 +0000 (20:10 +0100)
- updated jar(s)
- added missing business method (incomplete)

lib/juser-lib.jar
src/java/org/mxchange/jusercore/model/user/UserSessionBean.java

index e9610b7b5e6631e07a8b3214791e637e4363fc42..93248266d4eebd8afd5d1c428b3b196b1de2d19c 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
index 2502c7c649baca249e2beb65b212b4bf96ee5ff7..fe4e63375c0a1d62cf5645a616dcbc22a2cf7edf 100644 (file)
@@ -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