Package Components

Class UserInfo


  • public final class UserInfo
    extends java.lang.Object
    UserInfo class includes information regarding the user running the program
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static User user  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private UserInfo()
      Private constructor to hinder the creation of the utility class
    • Method Summary

      Modifier and Type Method Description
      static User getUser()
      Gets the user object of the user that is logged inn
      static void initializeUser​(User DBUser)
      Method that runs on login, updates UserInfo.user variable
      static void logOut()
      Method that logs out the user from the program, by setting the userId to 0 and userName to null
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • user

        private static User user
    • Constructor Detail

      • UserInfo

        private UserInfo()
        Private constructor to hinder the creation of the utility class
    • Method Detail

      • getUser

        public static User getUser()
        Gets the user object of the user that is logged inn
        Returns:
        the user object
      • initializeUser

        public static void initializeUser​(User DBUser)
        Method that runs on login, updates UserInfo.user variable
        Parameters:
        DBUser - takes the user object from the database in order to recognize the correct user
      • logOut

        public static void logOut()
        Method that logs out the user from the program, by setting the userId to 0 and userName to null