]> git.mxchange.org Git - juser-login-lib.git/commitdiff
added new business method findUserById()
authorRoland Haeder <roland@mxchange.org>
Fri, 15 Apr 2016 12:23:41 +0000 (14:23 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 15 Apr 2016 12:23:41 +0000 (14:23 +0200)
src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java

index 49ace592aeabeb39b5ae3d2daebdd9434533eeac..de178435179a7d1003659ed8887f0da7d5ef3deb 100644 (file)
@@ -21,6 +21,7 @@ import java.util.List;
 import javax.ejb.Remote;
 import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;
 import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
+import org.mxchange.jusercore.exceptions.UserNotFoundException;
 
 /**
  * An interface for user beans
@@ -30,12 +31,25 @@ import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
 @Remote
 public interface UserSessionBeanRemote extends Serializable {
 
+       /**
+        * Find user by given user id and returns fetched instance. If the user is
+        * not found, an exception is thrown.
+        * <p>
+        * @param userId User id
+        * <p>
+        * @return User instance
+        *
+        * @throws org.mxchange.jusercore.exceptions.UserNotFoundException If the user is not found
+        */
+       User findUserById (final Long userId) throws UserNotFoundException;
+
        /**
         * Adds given user to database, if not found by user name or email address.
         * <p>
         * @param user User instance to add
         * <p>
         * @return Updated user instance
+        * <p>
         * @throws org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException When the user name is already used
         * @throws org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException When the email address is already used
         */