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 Details

    • save

      TutorSchedule save(TutorSchedule schedule)
      Saves a new tutor schedule or updates an existing one.
      Parameters:
      schedule - the schedule to save
      Returns:
      the saved TutorSchedule entity
    • findById

      Optional<TutorSchedule> findById(Long id)
      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

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

      Set<TutorSchedule> findByTutorId(Long tutorId)
      Retrieves a set of schedules of certain tutor.
      Parameters:
      tutorId - the unique identifier of tutor
      Returns:
      the Set<TutorSchedule> containing the requested schedules
    • update

      void update(TutorSchedule schedule)
      Updates an existing schedule.
      Parameters:
      schedule - the schedule with updated information.
    • delete

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