java.lang.Object
employee.manager.EmployeeManager
- All Implemented Interfaces:
EmployeeManagement
Manages employee-related operations.
This class provides methods for adding, updating, and terminating employee records,
retrieving employee records, and retrieving employee IDs and lists.
Utilizes interfaces
EmployeeDataService and EmployeeManagement for data access and management.
Available methods:
-
Constructor Summary
ConstructorsConstructorDescriptionEmployeeManager(EmployeeDataService employeeDataService) Constructs an EmployeeManager object with the specified EmployeeDataService. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEmployee(EmployeeRecord newRecord) Adds a new employee record.voidaddEmployee_CSV(String employeeCSVPath) Adds employees from a CSV file.Retrieves a list of active employee records.intgetAddedEmployeeNumber(String filePath) Retrieves the number of added employees from a CSV file.Retrieves a list of employee IDs.Retrieves a list of all employee records.getEmployeeRecord(int employeeID) Retrieves an employee record by its ID.voidterminateEmployee(EmployeeRecord selectedEmployee) Terminates an employee.voidupdateEmployee(EmployeeRecord updatedRecord) Updates an existing employee record.
-
Constructor Details
-
EmployeeManager
Constructs an EmployeeManager object with the specified EmployeeDataService.- Parameters:
employeeDataService- the data service for employee records
-
-
Method Details
-
addEmployee
Adds a new employee record.- Specified by:
addEmployeein interfaceEmployeeManagement- Parameters:
newRecord- the new employee record to add- Throws:
EmployeeRecordsException- if an error occurs while adding the employee record
-
updateEmployee
Updates an existing employee record.- Specified by:
updateEmployeein interfaceEmployeeManagement- Parameters:
updatedRecord- the updated employee record- Throws:
EmployeeRecordsException- if an error occurs while updating the employee record
-
terminateEmployee
Terminates an employee.- Specified by:
terminateEmployeein interfaceEmployeeManagement- Parameters:
selectedEmployee- the employee record to terminate- Throws:
EmployeeRecordsException- if an error occurs while terminating the employee
-
getEmployeeRecord
Retrieves an employee record by its ID.- Specified by:
getEmployeeRecordin interfaceEmployeeManagement- Parameters:
employeeID- the ID of the employee- Returns:
- the employee record
-
getEmployeeList
Retrieves a list of all employee records.- Specified by:
getEmployeeListin interfaceEmployeeManagement- Returns:
- a list of employee records
-
getEmployeeIDList
Retrieves a list of employee IDs.- Specified by:
getEmployeeIDListin interfaceEmployeeManagement- Returns:
- a list of employee IDs
-
getActiveEmployeeList
Retrieves a list of active employee records.- Specified by:
getActiveEmployeeListin interfaceEmployeeManagement- Returns:
- a list of active employee records
-
getAddedEmployeeNumber
Retrieves the number of added employees from a CSV file.- Specified by:
getAddedEmployeeNumberin interfaceEmployeeManagement- Parameters:
filePath- the path to the CSV file- Returns:
- the number of added employees
-
addEmployee_CSV
Adds employees from a CSV file.- Specified by:
addEmployee_CSVin interfaceEmployeeManagement- Parameters:
employeeCSVPath- the path to the CSV file containing employee data
-