From: Roland Häder Date: Thu, 21 Apr 2016 13:41:45 +0000 (+0200) Subject: added business method for checking user name existence X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cd06b8d5ef605240454bb6bf2a675dbef1070600;p=juser-login-lib.git added business method for checking user name existence --- diff --git a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java index 7065957..80a55f5 100644 --- a/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java +++ b/src/org/mxchange/jusercore/model/user/UserSessionBeanRemote.java @@ -48,7 +48,9 @@ public interface UserSessionBeanRemote extends Serializable { *

* @return User instance * - * @throws org.mxchange.jusercore.exceptions.UserNotFoundException If the user is not found + * @throws org.mxchange.jusercore.exceptions.UserNotFoundException If the + * user is + * not found */ User findUserById (final Long userId) throws UserNotFoundException; @@ -59,8 +61,22 @@ public interface UserSessionBeanRemote extends Serializable { *

* @return Updated user instance *

- * @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 + * @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 */ User addUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException; @@ -119,6 +135,15 @@ public interface UserSessionBeanRemote extends Serializable { */ boolean ifUserIdExists (final Long userId); + /** + * Checks if given user name is already used + *

+ * @param userName User name to check + *

+ * @return Whether given user name is found + */ + boolean ifUserNameExists (final String userName); + /** * Checks if given user exists *