Class Manager
java.lang.Object
entity.user.Manager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetAge()Gets the manager's age.Gets the manager's hashed password.Gets the manager's marital status.getName()Gets the manager's name.Gets the list of project IDs managed by this manager.Gets the manager's user ID.voidsetAge(int age) Sets the manager's age.voidsetHashedPassoword(String hashedPassword) Sets the manager's hashed password.voidsetMaritalStatus(MaritalStatus maritalStatus) Sets the manager's marital status.voidSets the manager's name.voidsetProject(List<String> project) Sets the list of project IDs managed by this manager.voidSets the manager's user ID.
-
Constructor Details
-
Manager
public Manager()Default constructor. Initializes a new Manager instance with default values (e.g., empty strings, zero age). The list of managed projects is initialized as an empty ArrayList. Note: Explicit call to super() is redundant here. -
Manager
public Manager(String userID, String name, String hashedPassword, int age, MaritalStatus maritalStatus) Parameterized constructor to create a Manager with specified initial personal details. The list of managed projects is initialized as an empty ArrayList; projects are typically assigned later.- Parameters:
userID- The unique user ID for the manager.name- The name of the manager.hashedPassword- The hashed password for the account.age- The age of the manager.maritalStatus- The marital status of the manager.
-
-
Method Details
-
getUserID
Gets the manager's user ID. ImplementsUser.getUserID(). -
setUserID
-
getName
Gets the manager's name. ImplementsUser.getName(). -
setName
-
getHashedPassword
Gets the manager's hashed password. ImplementsUser.getHashedPassword().- Specified by:
getHashedPasswordin interfaceUser- Returns:
- The Base64 encoded hashed password string.
-
setHashedPassoword
Sets the manager's hashed password. Note: Typo in original method name ("Passoword"). Kept here to match provided code. Consider renaming to setHashedPassword for consistency. ImplementsUser.setHashedPassoword(String).- Specified by:
setHashedPassowordin interfaceUser- Parameters:
hashedPassword- The Base64 encoded hashed password string.
-
getAge
-
setAge
-
getMaritalStatus
Gets the manager's marital status.- Specified by:
getMaritalStatusin interfaceUser- Returns:
- The
MaritalStatusenum value.
-
setMaritalStatus
Sets the manager's marital status.- Specified by:
setMaritalStatusin interfaceUser- Parameters:
maritalStatus- TheMaritalStatusenum value.
-
getProject
-
setProject
-