java.lang.Object
attendance.manager.AttendanceManager
- All Implemented Interfaces:
AttendanceManagement
Manages attendance-related operations.
This class provides methods for logging time in and time out, adding and updating attendance records,
retrieving attendance records, and retrieving attendance records for specific employees or periods.
Utilizes interfaces
AttendanceDataService, and AttendanceManagement for data access and management.
Available methods:
-
Constructor Summary
ConstructorsConstructorDescriptionAttendanceManager(AttendanceDataService attendanceDataService) Constructor for AttendanceManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttendanceRecord(AttendanceRecord newRecord) Adds a new attendance record.Retrieves all attendance records.getAttendanceRecord(String attendanceID) Retrieves an attendance record by its ID.getAttendanceRecord_List(int employeeID) Retrieves all attendance records for a specific employee.getAttendanceRecord_List(int employeeID, LocalDate periodStart, LocalDate periodEnd) Retrieves attendance records for a specific employee within a specified period.voidlogTimeIn(int employeeID, EmployeeRecord personalRecord) Logs the time in for an employee.voidlogTimeOut(String attendanceID) Logs the time out for an attendance record.voidupdateAttendanceRecord(AttendanceRecord updatedRecord) Updates an existing attendance record.
-
Constructor Details
-
AttendanceManager
Constructor for AttendanceManager.- Parameters:
attendanceDataService- the data service for attendance
-
-
Method Details
-
logTimeIn
Description copied from interface:AttendanceManagementLogs the time in for an employee.- Specified by:
logTimeInin interfaceAttendanceManagement- Parameters:
employeeID- the ID of the employeepersonalRecord- the personal record of the employee- Throws:
AttendanceException- if an error occurs during logging time in
-
logTimeOut
Description copied from interface:AttendanceManagementLogs the time out for an attendance record.- Specified by:
logTimeOutin interfaceAttendanceManagement- Parameters:
attendanceID- the ID of the attendance record- Throws:
AttendanceException- if an error occurs during logging time out
-
addAttendanceRecord
Adds a new attendance record.- Specified by:
addAttendanceRecordin interfaceAttendanceManagement- Parameters:
newRecord- the new attendance record to add
-
updateAttendanceRecord
Description copied from interface:AttendanceManagementUpdates an existing attendance record.- Specified by:
updateAttendanceRecordin interfaceAttendanceManagement- Parameters:
updatedRecord- the updated attendance record
-
getAttendanceRecord
Description copied from interface:AttendanceManagementRetrieves an attendance record by its ID.- Specified by:
getAttendanceRecordin interfaceAttendanceManagement- Parameters:
attendanceID- the ID of the attendance record to retrieve- Returns:
- the attendance record
-
getAllAttendanceRecords
Description copied from interface:AttendanceManagementRetrieves all attendance records.- Specified by:
getAllAttendanceRecordsin interfaceAttendanceManagement- Returns:
- a list of all attendance records
-
getAttendanceRecord_List
public List<AttendanceRecord> getAttendanceRecord_List(int employeeID, LocalDate periodStart, LocalDate periodEnd) Description copied from interface:AttendanceManagementRetrieves attendance records for a specific employee within a specified period.- Specified by:
getAttendanceRecord_Listin interfaceAttendanceManagement- Parameters:
employeeID- the ID of the employeeperiodStart- the start date of the periodperiodEnd- the end date of the period- Returns:
- a list of attendance records for the employee within the specified period
-
getAttendanceRecord_List
Description copied from interface:AttendanceManagementRetrieves all attendance records for a specific employee.- Specified by:
getAttendanceRecord_Listin interfaceAttendanceManagement- Parameters:
employeeID- the ID of the employee- Returns:
- a list of attendance records for the employee
-