Interface TutorScheduleService

All Known Implementing Classes:
TutorScheduleServiceImpl

public interface TutorScheduleService
Service interface for managing TutorSchedule entities. Define methods for CRUD operations and querying schedules.
  • Method Details

    • createSchedule

      TutorSchedule createSchedule(TutorSchedule schedule, Long tutorId)
      Creates a new schedule.
      Parameters:
      schedule - the schedule to create
      tutorId - the tutor unique identifier who owns the schedule
      Returns:
      the created TutorSchedule
      Throws:
      TutorScheduleOverlapsException - if schedule overlaps another schedule.
      EntityNotFoundException - if tutor with given id not found.
    • findById

      TutorSchedule findById(Long id)
      Retrieves a schedule by its unique identifier.
      Parameters:
      id - the unique identifier of the schedule
      Returns:
      the found TutorSchedule
      Throws:
      EntityNotFoundException - if schedule with given id not found
    • getTutorSchedules

      Page<TutorSchedule> getTutorSchedules(int pageNumber, int pageSize, Long tutorId)
      Retrieves a paginated list of tutor schedules.
      Parameters:
      pageNumber - the page number (starting from 0)
      pageSize - the number of tutors per page
      tutorId - the unique identifier of the tutor that owns this schedule
      Returns:
      a Page containing the requested schedules
    • update

      void update(TutorSchedule schedule, Long id)
      Updates an existing schedule.
      Parameters:
      schedule - the updated schedule data
      id - the unique identifier of the schedule to update
      Throws:
      TutorScheduleOverlapsException - if schedule overlaps another schedule.
    • delete

      void delete(Long id)
      Deletes a schedule by its unique identifier.
      Parameters:
      id - the unique identifier of the schedule to delete