Class UserService


  • public final class UserService
    extends java.lang.Object
    Service class of a user
    Author:
    Laurent Payen
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static User findUserByFirstNameLastNameAndEmail​(java.lang.String strFirstName, java.lang.String strLastName, java.lang.String strEmail)
      Find a user by its first name, last name and email
      static User findUserById​(int nIdUser)
      Find a User by its primary key
      static java.util.List<User> findUsersByEmail​(java.lang.String strEmail)
      Find users by its email
      static User saveUser​(AppointmentDTO appointment)
      Save a user in database / A user is defined by its email (unique)
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • saveUser

        public static User saveUser​(AppointmentDTO appointment)
        Save a user in database / A user is defined by its email (unique)
        Parameters:
        appointment - the appointment DTO
        Returns:
        the user saved
      • findUserById

        public static User findUserById​(int nIdUser)
        Find a User by its primary key
        Parameters:
        nIdUser - the primary key
        Returns:
        the User found
      • findUserByFirstNameLastNameAndEmail

        public static User findUserByFirstNameLastNameAndEmail​(java.lang.String strFirstName,
                                                               java.lang.String strLastName,
                                                               java.lang.String strEmail)
        Find a user by its first name, last name and email
        Parameters:
        strFirstName - the first name
        strLastName - the last name
        strEmail - the email
        Returns:
        the user
      • findUsersByEmail

        public static java.util.List<User> findUsersByEmail​(java.lang.String strEmail)
        Find users by its email
        Parameters:
        strEmail - the email
        Returns:
        the user(s)