Class StudentServiceImpl
java.lang.Object
org.example.crmedu.domain.service.student.StudentServiceImpl
- All Implemented Interfaces:
StudentService
Implementation of the
StudentService
interface. Provides business logic for managing Student
entities.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new student.void
deleteStudent
(Long id) Deletes a student by its unique identifier.Retrieves a student by its unique identifier.getStudents
(int pageNumber, int pageSize) Retrieves a paginated list of students.void
updateStudent
(Student student, Long id) Updates an existing student
-
Constructor Details
-
StudentServiceImpl
public StudentServiceImpl()
-
-
Method Details
-
create
Description copied from interface:StudentService
Creates a new student.- Specified by:
create
in interfaceStudentService
- Parameters:
student
- the student to create- Returns:
- the created
Student
-
findById
Description copied from interface:StudentService
Retrieves a student by its unique identifier.- Specified by:
findById
in interfaceStudentService
- Parameters:
id
- the unique identifier of the student- Returns:
- the found
Student
-
getStudents
Description copied from interface:StudentService
Retrieves a paginated list of students.- Specified by:
getStudents
in interfaceStudentService
- Parameters:
pageNumber
- the page number (starting from 0)pageSize
- the number of students per page- Returns:
- a
Page
containing the requested students
-
updateStudent
Description copied from interface:StudentService
Updates an existing student- Specified by:
updateStudent
in interfaceStudentService
- Parameters:
student
- the updated student dataid
- the unique identifier of the student to update
-
deleteStudent
Description copied from interface:StudentService
Deletes a student by its unique identifier.- Specified by:
deleteStudent
in interfaceStudentService
- Parameters:
id
- the unique identifier of the student to delete
-