Class SubjectServiceImpl

java.lang.Object
org.example.crmedu.domain.service.subject.SubjectServiceImpl
All Implemented Interfaces:
SubjectService

@Service public class SubjectServiceImpl extends Object implements SubjectService
Implementation of the SubjectService interface. Provides business logic for managing Subject entities.
  • Constructor Details

    • SubjectServiceImpl

      public SubjectServiceImpl()
  • Method Details

    • create

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

      @Transactional public Subject findById(Long id)
      Description copied from interface: SubjectService
      Retrieves a subject by its unique identifier.
      Specified by:
      findById in interface SubjectService
      Parameters:
      id - the unique identifier of the subject
      Returns:
      the found Subject
    • findAll

      public Page<Subject> findAll(int pageNumber, int pageSize)
      Description copied from interface: SubjectService
      Retrieves a paginated list of subjects.
      Specified by:
      findAll in interface SubjectService
      Parameters:
      pageNumber - the page number (starting from 0)
      pageSize - the number of subjects per page
      Returns:
      a Page containing the requested subjects
    • update

      @Transactional public void update(Subject subject, Long id)
      Description copied from interface: SubjectService
      Updates an existing subject
      Specified by:
      update in interface SubjectService
      Parameters:
      subject - the updated subject data
      id - the unique identifier of the subject to update
    • delete

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