Class StudentServiceImpl

java.lang.Object
org.example.crmedu.domain.service.student.StudentServiceImpl
All Implemented Interfaces:
StudentService

@Service public class StudentServiceImpl extends Object implements StudentService
Implementation of the StudentService interface. Provides business logic for managing Student entities.
  • Constructor Details

    • StudentServiceImpl

      public StudentServiceImpl()
  • Method Details

    • create

      public Student create(Student student)
      Description copied from interface: StudentService
      Creates a new student.
      Specified by:
      create in interface StudentService
      Parameters:
      student - the student to create
      Returns:
      the created Student
    • findById

      @Transactional public Student findById(Long id)
      Description copied from interface: StudentService
      Retrieves a student by its unique identifier.
      Specified by:
      findById in interface StudentService
      Parameters:
      id - the unique identifier of the student
      Returns:
      the found Student
    • getStudents

      public Page<Student> getStudents(int pageNumber, int pageSize)
      Description copied from interface: StudentService
      Retrieves a paginated list of students.
      Specified by:
      getStudents in interface StudentService
      Parameters:
      pageNumber - the page number (starting from 0)
      pageSize - the number of students per page
      Returns:
      a Page containing the requested students
    • updateStudent

      @Transactional public void updateStudent(Student student, Long id)
      Description copied from interface: StudentService
      Updates an existing student
      Specified by:
      updateStudent in interface StudentService
      Parameters:
      student - the updated student data
      id - the unique identifier of the student to update
    • deleteStudent

      public void deleteStudent(Long id)
      Description copied from interface: StudentService
      Deletes a student by its unique identifier.
      Specified by:
      deleteStudent in interface StudentService
      Parameters:
      id - the unique identifier of the student to delete