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 TypeMethodDescriptionintAdd staff int.Gets current staff.getStaff(int staffIdx) Gets staff.Gets staff.intgetStaffIdx(String staffId) Gets staff idx.Gets staffs.protected booleanSave staffs boolean.voidsetCurrentStaff(int staffIdx) Sets current staff.booleanvalidateUsernameAvailability(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
-