Class Supervisor

java.lang.Object
main.model.user.Supervisor
All Implemented Interfaces:
Model, User, Mappable

public class Supervisor extends Object implements User
This class represents a supervisor, which is a type of user. It extends the User class and includes a supervisor ID field.
  • Field Details

    • supervisorID

      private String supervisorID
      The ID of the supervisor.
    • supervisorName

      private String supervisorName
      The name of the supervisor
    • email

      private String email
      The email of a supervisor
    • hashedPassword

      private String hashedPassword
  • Constructor Details

    • Supervisor

      public Supervisor(String supervisorID, String supervisorName, String email)
      Constructs a new Supervisor object with the specified supervisor ID.
      Parameters:
      supervisorID - the ID of the supervisor.
      supervisorName - the name of the supervisor.
      email - the email of the supervisor.
    • Supervisor

      public Supervisor(String supervisorID, String supervisorName, String email, String hashedPassword)
      Constructs a new Supervisor object with the specified supervisor ID and password.
      Parameters:
      supervisorID - the ID of the supervisor.
      supervisorName - the name of the supervisor.
      email - the email of the supervisor.
      hashedPassword - the password of the supervisor.
    • Supervisor

      public Supervisor(Map<String,String> map)
      Constructs a new Supervisor object from a map
      Parameters:
      map - the map
    • Supervisor

      public Supervisor()
      default constructor for Supervisor class
  • Method Details

    • getUser

      public static User getUser(Map<String,String> map)
    • getID

      public String getID()
      Gets the user ID of the user.
      Specified by:
      getID in interface Model
      Specified by:
      getID in interface User
      Returns:
      the ID of the user.
    • getUserName

      public String getUserName()
      Gets the username
      Specified by:
      getUserName in interface User
      Returns:
      the name of the user
    • getHashedPassword

      public String getHashedPassword()
      Gets the hashed password of the user
      Specified by:
      getHashedPassword in interface User
      Returns:
      the hashed password of the user
    • setHashedPassword

      public void setHashedPassword(String hashedPassword)
      Sets the hashed password of the user
      Specified by:
      setHashedPassword in interface User
      Parameters:
      hashedPassword - the hashed password of the user
    • getEmail

      public String getEmail()
      Gets the email of the user
      Specified by:
      getEmail in interface User
      Returns:
      the email of the user