Package moblima.control.handlers
Class StaffHandler
java.lang.Object
moblima.control.handlers.StaffHandler
The type Staff handler.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Add staff int.Gets current staff.getStaff
(int staffIdx) Gets staff.Gets staff.int
getStaffIdx
(String staffId) Gets staff idx.Gets staffs.protected boolean
Save staffs boolean.void
setCurrentStaff
(int staffIdx) Sets current staff.boolean
validateUsernameAvailability
(String username) Validate username availability boolean.
-
Field Details
-
staffs
The Staffs. -
currentStaff
The Current staff.
-
-
Constructor Details
-
StaffHandler
public StaffHandler()Instantiates a new Staff handler.
-
-
Method Details
-
getCurrentStaff
Gets current staff.- Returns:
- the current staff
-
setCurrentStaff
public void setCurrentStaff(int staffIdx) Sets current staff.- Parameters:
staffIdx
- the staff idx
-
validateUsernameAvailability
Validate username availability boolean.- Parameters:
username
- the username- Returns:
- the boolean
-
getStaffs
Gets staffs.- Returns:
- the staffs
-
getStaff
Gets staff.- Parameters:
staffIdx
- the staff idx- Returns:
- the staff
-
getStaff
Gets staff.- Parameters:
username
- the username- Returns:
- the staff
-
getStaffIdx
Gets staff idx.- Parameters:
staffId
- the staff id- Returns:
- the staff idx
-
addStaff
Add staff int.- Parameters:
name
- the nameusername
- the usernamepassword
- the password- Returns:
- the int
-
saveStaffs
protected boolean saveStaffs()Save staffs boolean.- Returns:
- the boolean
-