Class AttendanceServiceImpl

java.lang.Object
it.astromark.attendance.service.AttendanceServiceImpl
All Implemented Interfaces:
AttendanceService

@Service public class AttendanceServiceImpl extends Object implements AttendanceService
  • Constructor Details

  • Method Details

    • getAttendance

      @Transactional @PreAuthorize("hasRole(\'TEACHER\')") public List<AttendanceResponse> getAttendance(@NotNull @NotNull Integer classId, @NotNull @NotNull LocalDate date)
      Description copied from interface: AttendanceService
      Retrieves the attendance records for a specific class on a given date.
      Specified by:
      getAttendance in interface AttendanceService
      Parameters:
      classId - the ID of the class
      date - the date to retrieve attendance for
      Returns:
      a list of AttendanceResponse objects representing the attendance records Pre-condition: The classId and date must not be null. The class associated with the classId must exist. Post-condition: Returns a list of attendance records for the specified class and date.
    • saveAttendance

      @Transactional @PreAuthorize("hasRole(\'TEACHER\')") public void saveAttendance(@NotNull @NotNull Integer classId, @NotNull @NotNull LocalDate date, @NotNull @NotNull List<AttendanceRequest> attendanceRequests)
      Description copied from interface: AttendanceService
      Saves the attendance records for a specific class on a given date.
      Specified by:
      saveAttendance in interface AttendanceService
      Parameters:
      classId - the ID of the class
      date - the date to save attendance for
      attendanceRequests - a list of AttendanceRequest objects containing attendance details Pre-condition: The classId and date must not be null. The attendanceRequests must not be null and must contain valid attendance data. Post-condition: The attendance records are saved for the specified class and date.