Package user.roles

Class PayrollAdmin

java.lang.Object
user.roles.Employee
user.roles.PayrollAdmin

public class PayrollAdmin extends Employee
Represents a Payroll Administrator in the system, responsible for managing payroll-related tasks.

Available methods:

  • Constructor Details

    • PayrollAdmin

      public PayrollAdmin(FileDataService dataService, int employeeID)
      Constructs a PayrollAdmin object.
      Parameters:
      dataService - The data service used for data manipulation.
      employeeID - The unique identifier of the Payroll Admin employee.
  • Method Details

    • getTempPayrollRecords_Batch

      public List<PayrollRecord> getTempPayrollRecords_Batch()
      Retrieves the temporary payroll records from the batch process.
      Returns:
      The temporary payroll records.
    • getEmployeeIDList

      public List<Integer> getEmployeeIDList()
      Retrieves a list of employee IDs.
      Returns:
      A list of employee IDs.
    • getEmployeeRecord

      public EmployeeRecord getEmployeeRecord(int employeeID)
      Retrieves an employee record.
      Parameters:
      employeeID - The employee ID.
      Returns:
      The employee record.
    • getHoursWorked

      public double getHoursWorked(int employeeID, String period)
      Retrieves the number of hours worked.
      Parameters:
      employeeID - The employee ID.
      period - The period.
      Returns:
      The number of hours worked.
    • getOvertimeHours

      public double getOvertimeHours(int employeeID, String period)
      Retrieves the number of overtime hours.
      Parameters:
      employeeID - The employee ID.
      period - The period.
      Returns:
      The number of overtime hours.
    • runBatchPayroll

      public void runBatchPayroll(String payrollPeriod) throws EmployeeRecordsException, PayrollException
      Runs batch payroll for the specified payroll period.
      Parameters:
      payrollPeriod - The period for which the payroll is to be run.
      Throws:
      EmployeeRecordsException - If an error occurs while accessing employee records.
      PayrollException - If an error occurs during the payroll process.
    • runManualPayroll

      public PayrollRecord runManualPayroll(PayrollRecord tempPayrollRecord_Manual, String payrollPeriod) throws EmployeeRecordsException
      Runs batch payroll for the specified payroll period.
      Parameters:
      payrollPeriod - The period for which the payroll is to be run.
      Throws:
      EmployeeRecordsException
    • generatePayrollReport

      public List<String[]> generatePayrollReport(String reportPeriod) throws PayrollException
      Generates a payroll report for the specified period.
      Parameters:
      reportPeriod - The period for which the report is to be generated.
      Returns:
      A list of string arrays representing the payroll report.
      Throws:
      PayrollException - If an error occurs while generating the payroll report.
    • submitBatchPayroll

      public void submitBatchPayroll() throws PayrollException
      Submits the batch processed payroll records.
      Throws:
      PayrollException - If an error occurs while submitting the payroll records.
    • submitManualPayroll

      public void submitManualPayroll()
      Submits the manual processed payroll records.