Class Staff

java.lang.Object
my.edu.tarc.dco.bookrentalpos.Entity
my.edu.tarc.dco.bookrentalpos.Staff

public class Staff
extends Entity
Class used to store Staff data
Version:
1.0
Author:
Looz
  • Constructor Details

    • Staff

      public Staff()
      Blank
    • Staff

      public Staff​(String usrname, String password)
      Constructor used to create new Staff
      Parameters:
      usrname - username, later used to login
      password - password in plain text, later used to login
    • Staff

      public Staff​(int id, String dateCreated, String usrname, String hashedPW)
      Constructor used to import data from database. DO NOT use to create new Staff
      Parameters:
      id - StaffID generated by database
      dateCreated - staff creation date generated by database
      usrname - Staff username
      hashedPW - md5Hash of the password
  • Method Details

    • hasAdminPrivillage

      public boolean hasAdminPrivillage()
      This function does not work yet. (Not implemented)
      Returns:
      false
    • setPassword

      public void setPassword​(String password)
      Parameters:
      password - password in plain text.
    • getPW

      public String getPW()
      Returns:
      Hash of the staff password
    • setAdminStatus

      public void setAdminStatus​(boolean bool)
      Parameters:
      bool - pass in true if you wish to set this staff as admin, vice versa
    • isAdmin

      public boolean isAdmin()
      Returns:
      true if this staff is admin