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 Summary
Modifier and TypeMethodDescriptioncreateSchedule
(TutorSchedule schedule, Long tutorId) Creates a new schedule.void
Deletes a schedule by its unique identifier.Retrieves a schedule by its unique identifier.getTutorSchedules
(int pageNumber, int pageSize, Long tutorId) Retrieves a paginated list of tutor schedules.void
update
(TutorSchedule schedule, Long id) Updates an existing schedule.
-
Method Details
-
createSchedule
Creates a new schedule.- Parameters:
schedule
- the schedule to createtutorId
- 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
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
Retrieves a paginated list of tutor schedules.- Parameters:
pageNumber
- the page number (starting from 0)pageSize
- the number of tutors per pagetutorId
- the unique identifier of the tutor that owns this schedule- Returns:
- a
Page
containing the requested schedules
-
update
Updates an existing schedule.- Parameters:
schedule
- the updated schedule dataid
- the unique identifier of the schedule to update- Throws:
TutorScheduleOverlapsException
- if schedule overlaps another schedule.
-
delete
Deletes a schedule by its unique identifier.- Parameters:
id
- the unique identifier of the schedule to delete
-