Package user.roles

Class Employee

java.lang.Object
user.roles.Employee
Direct Known Subclasses:
HRAdmin, ITAdmin, PayrollAdmin

public class Employee extends Object
Represents an employee in the system, providing access to various features such as attendance management, leave management, and payroll management.

Available methods:

  • Constructor Details

    • Employee

      public Employee(FileDataService dataService, int employeeID)
      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

      public String getAttendanceID()
      Retrieves the attendance ID associated with the employee.
      Returns:
      The attendance ID associated with the employee.
    • getLeaveID

      public String getLeaveID()
      Retrieves the leave ID associated with the employee.
      Returns:
      The leave ID associated with the employee.
    • getPersonalRecord

      public EmployeeRecord getPersonalRecord()
      Retrieves the personal record of the employee.
      Returns:
      The personal record of the employee.
    • getPersonalAttendanceRecordList

      public List<AttendanceRecord> getPersonalAttendanceRecordList()
      Retrieves a list of personal attendance records of the employee.
      Returns:
      A list of personal attendance records of the employee.
    • getPersonalLeaveRecordList

      public List<LeaveRecord> getPersonalLeaveRecordList()
      Retrieves a list of personal leave records of the employee.
      Returns:
      A list of personal leave records of the employee.
    • getLeaveBalance_OfType

      public int getLeaveBalance_OfType(String leaveType)
      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

      public LeaveBalanceRecord getLeaveBalance()
      Retrieves the leave balance record of the employee.
      Returns:
      The leave balance record of the employee.
    • getPayslip

      public PayrollRecord getPayslip(String period, int month, int employeeID)
      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

      public void clockIn() throws AttendanceException, EmployeeRecordsException
      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

      public void clockOut() throws AttendanceException
      Logs the employee's time out.
      Throws:
      AttendanceException - If an error occurs during attendance logging.
    • submitLeaveRequest

      public void submitLeaveRequest(LeaveRecord leaveRecord) throws LeaveException
      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.