Package my.edu.tarc.dco.bookrentalpos
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 Summary
-
Method Summary
Modifier and Type Method Description StringgetPW()booleanhasAdminPrivillage()This function does not work yet.booleanisAdmin()voidsetAdminStatus(boolean bool)voidsetPassword(String password)Methods inherited from class my.edu.tarc.dco.bookrentalpos.Entity
equals, getDateCreated, getId, getName, setDateCreated, setID, setName
-
Constructor Details
-
Staff
public Staff()Blank -
Staff
Constructor used to create new Staff- Parameters:
usrname- username, later used to loginpassword- password in plain text, later used to login
-
Staff
Constructor used to import data from database. DO NOT use to create new Staff- Parameters:
id- StaffID generated by databasedateCreated- staff creation date generated by databaseusrname- Staff usernamehashedPW- md5Hash of the password
-
-
Method Details
-
hasAdminPrivillage
public boolean hasAdminPrivillage()This function does not work yet. (Not implemented)- Returns:
- false
-
setPassword
- Parameters:
password- password in plain text.
-
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
-