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
@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
*/