Interface TutorScheduleRepository
- All Known Implementing Classes:
TutorScheduleRepositoryImpl
public interface TutorScheduleRepository
Repository interface for managing
TutorSchedule
entities. Defines methods for CRUD operations and querying tutors.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes a schedule by its unique identifier.Retrieves a tutor schedule by its unique identifier.findByTutorId
(Long tutorId) Retrieves a set of schedules of certain tutor.findPagesByTutorId
(int pageNumber, int pageSize, Long tutorId) Retrieves a paginated list of schedules of certain tutor.save
(TutorSchedule schedule) Saves a new tutor schedule or updates an existing one.void
update
(TutorSchedule schedule) Updates an existing schedule.
-
Method Details
-
save
Saves a new tutor schedule or updates an existing one.- Parameters:
schedule
- the schedule to save- Returns:
- the saved
TutorSchedule
entity
-
findById
Retrieves a tutor schedule by its unique identifier.- Parameters:
id
- the unique identifier of the tutor schedule- Returns:
- an
Optional
containing the tutor schedule if found, otherwise empty
-
findPagesByTutorId
Retrieves a paginated list of schedules of certain tutor.- Parameters:
pageNumber
- pageNumber the page number (starting from 0)pageSize
- the number of tutors per pagetutorId
- the unique identifier of the tutor.- Returns:
- a
Page
containing the requested schedules
-
findByTutorId
Retrieves a set of schedules of certain tutor.- Parameters:
tutorId
- the unique identifier of tutor- Returns:
- the
Set<TutorSchedule>
containing the requested schedules
-
update
Updates an existing schedule.- Parameters:
schedule
- the schedule with updated information.
-
delete
Deletes a schedule by its unique identifier.- Parameters:
id
- the unique identifier of the schedule to delete
-