Class UserHome


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static User create​(User user)
      Create an instance of the User class
      static void delete​(int nKey)
      Delete the User whose identifier is specified in parameter
      static java.util.List<User> findByEmail​(java.lang.String strEmail)
      return user(s) by its email
      static User findByFirstNameLastNameAndEmail​(java.lang.String strFirstName, java.lang.String strLastName, java.lang.String strEmail)
      return a user by its firstname, lastname and email
      static User findByGuid​(java.lang.String strGuid)
      Returns an instance of the User whose identifier is specified in parameter
      static User findByPrimaryKey​(int nKey)
      Returns an instance of the User whose identifier is specified in parameter
      static User update​(User user)
      Update of the User which is specified in parameter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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​(java.lang.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​(java.lang.String strFirstName,
                                                           java.lang.String strLastName,
                                                           java.lang.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 java.util.List<User> findByEmail​(java.lang.String strEmail)
        return user(s) by its email
        Parameters:
        strEmail - the user email
        Returns:
        the user(s) if it exists