java.lang.Object
user.roles.Employee
- Direct Known Subclasses:
HRAdmin
,ITAdmin
,PayrollAdmin
Represents an employee in the system, providing access to various features such as attendance management,
leave management, and payroll management.
Available methods:
getEmployeeID()
Returns the employee's ID.getAttendanceID()
Returns the attendance ID associated with the employee.getLeaveID()
Returns the leave ID associated with the employee.getPersonalRecord()
Returns the personal record of the employee.getPersonalAttendanceRecordList()
Returns a list of personal attendance records of the employee.getPersonalLeaveRecordList()
Returns a list of personal leave records of the employee.getLeaveBalance_OfType(String)
Returns the leave balance of the specified type for the employee.getLeaveBalance()
Returns the leave balance record of the employee.getPayslip(String, int, int)
Returns the payslip of the employee for the specified period and month.clockIn()
Logs the employee's time in.clockOut()
Logs the employee's time out.submitLeaveRequest(LeaveRecord)
Submits a leave request for the employee.
-
Constructor Summary
ConstructorsConstructorDescriptionEmployee
(FileDataService dataService, int employeeID) Constructs an Employee object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clockIn()
Logs the employee's time in.void
clockOut()
Logs the employee's time out.Retrieves the attendance ID associated with the employee.int
Retrieves the employee's ID.Retrieves the leave balance record of the employee.int
getLeaveBalance_OfType
(String leaveType) Retrieves the leave balance of the specified type for the employee.Retrieves the leave ID associated with the employee.getPayslip
(String period, int month, int employeeID) Retrieves the payslip of the employee for the specified year and month.Retrieves a list of personal attendance records of the employee.Retrieves a list of personal leave records of the employee.Retrieves the personal record of the employee.void
submitLeaveRequest
(LeaveRecord leaveRecord) Submits a leave request for the employee.
-
Constructor Details
-
Employee
Constructs an Employee object.- Parameters:
dataService
- The data service used for data manipulation.employeeID
- The unique identifier of the employee.
-
-
Method Details
-
getEmployeeID
public int getEmployeeID()Retrieves the employee's ID.- Returns:
- The employee's ID.
-
getAttendanceID
Retrieves the attendance ID associated with the employee.- Returns:
- The attendance ID associated with the employee.
-
getLeaveID
Retrieves the leave ID associated with the employee.- Returns:
- The leave ID associated with the employee.
-
getPersonalRecord
Retrieves the personal record of the employee.- Returns:
- The personal record of the employee.
-
getPersonalAttendanceRecordList
Retrieves a list of personal attendance records of the employee.- Returns:
- A list of personal attendance records of the employee.
-
getPersonalLeaveRecordList
Retrieves a list of personal leave records of the employee.- Returns:
- A list of personal leave records of the employee.
-
getLeaveBalance_OfType
Retrieves the leave balance of the specified type for the employee.- Parameters:
leaveType
- The type of leave.- Returns:
- The leave balance of the specified type for the employee.
-
getLeaveBalance
Retrieves the leave balance record of the employee.- Returns:
- The leave balance record of the employee.
-
getPayslip
Retrieves the payslip of the employee for the specified year and month.- Parameters:
period
- The period for which the payslip is requested.month
- The month for which the payslip is requested.employeeID
- The unique identifier of the employee.- Returns:
- The payslip of the employee for the specified year and month.
-
clockIn
Logs the employee's time in.- Throws:
AttendanceException
- If an error occurs during attendance logging.EmployeeRecordsException
- If an error occurs while accessing employee records.
-
clockOut
Logs the employee's time out.- Throws:
AttendanceException
- If an error occurs during attendance logging.
-
submitLeaveRequest
Submits a leave request for the employee.- Parameters:
leaveRecord
- The leave record to be submitted.- Throws:
LeaveException
- If an error occurs while processing the leave request.
-