Package Components
Class UserInfo
- java.lang.Object
-
- Components.UserInfo
-
public final class UserInfo extends java.lang.ObjectUserInfo class includes information regarding the user running the program
-
-
Constructor Summary
Constructors Modifier Constructor Description privateUserInfo()Private constructor to hinder the creation of the utility class
-
Method Summary
Modifier and Type Method Description static UsergetUser()Gets the user object of the user that is logged innstatic voidinitializeUser(User DBUser)Method that runs on login, updates UserInfo.user variablestatic voidlogOut()Method that logs out the user from the program, by setting the userId to 0 and userName to null
-
-
-
Field Detail
-
user
private static User user
-
-
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
-
-