Class UserHome


  • public final class UserHome
    extends Object
    This class provides instances management methods for User objects
    Author:
    Laurent Payen
    • Method Detail

      • create

        public static User create​(User user)
        Create an instance of the User class
        Parameters:
        user - The instance of the User which contains the informations to store
        Returns:
        The instance of the User which has been created with its primary key.
      • update

        public static User update​(User user)
        Update of the User which is specified in parameter
        Parameters:
        user - The instance of the User which contains the data to store
        Returns:
        The instance of the User which has been updated
      • delete

        public static void delete​(int nKey)
        Delete the User whose identifier is specified in parameter
        Parameters:
        nKey - The User Id
      • findByPrimaryKey

        public static User findByPrimaryKey​(int nKey)
        Returns an instance of the User whose identifier is specified in parameter
        Parameters:
        nKey - The User primary key
        Returns:
        an instance of the User
      • findByGuid

        public static User findByGuid​(String strGuid)
        Returns an instance of the User whose identifier is specified in parameter
        Parameters:
        strGuid - The User guid key
        Returns:
        an instance of the User
      • findByFirstNameLastNameAndEmail

        public static User findByFirstNameLastNameAndEmail​(String strFirstName,
                                                           String strLastName,
                                                           String strEmail)
        return a user by its firstname, lastname and email
        Parameters:
        strFirstName - the user first name
        strLastName - the user last name
        strEmail - the user email
        Returns:
        the user if it exists
      • findByEmail

        public static List<User> findByEmail​(String strEmail)
        return user(s) by its email
        Parameters:
        strEmail - the user email
        Returns:
        the user(s) if it exists