Class TutorServiceImpl
java.lang.Object
org.example.crmedu.domain.service.tutor.TutorServiceImpl
- All Implemented Interfaces:
TutorService
Implementation of the
TutorService
interface. Provides business logic for managing Tutor
entities.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new tutor.void
Deletes a tutor by its unique identifier.findAll
(int pageNumber, int pageSize) Retrieves a paginated list of tutors.Retrieves an tutor by its unique identifier.void
patchGrades
(Set<Integer> grades, Long id) Updates the list of education classes that a tutor can teach.void
patchSubjects
(Set<Subject> subjects, Long id) Updates the list of subjects that a tutor can teach.void
Updates an existing tutor.
-
Constructor Details
-
TutorServiceImpl
public TutorServiceImpl()
-
-
Method Details
-
create
Description copied from interface:TutorService
Creates a new tutor.- Specified by:
create
in interfaceTutorService
- Parameters:
tutor
- the tutor to create- Returns:
- the created
Tutor
-
findById
Description copied from interface:TutorService
Retrieves an tutor by its unique identifier.- Specified by:
findById
in interfaceTutorService
- Parameters:
id
- the unique identifier of the tutor- Returns:
- the found
Tutor
-
findAll
Description copied from interface:TutorService
Retrieves a paginated list of tutors.- Specified by:
findAll
in interfaceTutorService
- Parameters:
pageNumber
- the page number (starting from 0)pageSize
- the number of tutors per page- Returns:
- a
Page
containing the requested tutors
-
update
Description copied from interface:TutorService
Updates an existing tutor.- Specified by:
update
in interfaceTutorService
- Parameters:
tutor
- the updated tutor dataid
- the unique identifier of the tutor to update
-
delete
Description copied from interface:TutorService
Deletes a tutor by its unique identifier.- Specified by:
delete
in interfaceTutorService
- Parameters:
id
- the unique identifier of the tutor to delete
-
patchSubjects
Description copied from interface:TutorService
Updates the list of subjects that a tutor can teach.- Specified by:
patchSubjects
in interfaceTutorService
- Parameters:
subjects
- set of subjectsid
- the unique identifier of the tutor to update
-
patchGrades
Description copied from interface:TutorService
Updates the list of education classes that a tutor can teach.- Specified by:
patchGrades
in interfaceTutorService
- Parameters:
grades
- set of gradesid
- the unique identifier of the tutor to update
-