Class DoctorServiceImpl
java.lang.Object
com.mirna.hospitalmanagementapi.application.services.DoctorServiceImpl
- All Implemented Interfaces:
DoctorService
This class is an implementation of the DoctorService interface.
This class provides methods to perform operations on doctors
- Version:
- 1.0
- Author:
- Mirna Gama
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a new doctor to the database.org.springframework.data.domain.Page<DoctorPublicDataDTO>findDoctors(org.springframework.data.domain.Pageable pageable) Finds doctors from the database.
-
Constructor Details
-
DoctorServiceImpl
public DoctorServiceImpl()
-
-
Method Details
-
addDoctor
Adds a new doctor to the database.- Specified by:
addDoctorin interfaceDoctorService- Parameters:
doctorDTO- A data transfer object containing the data for Doctor entity.- Returns:
- The saved doctor if successful, or null if there is an error.
-
findDoctors
public org.springframework.data.domain.Page<DoctorPublicDataDTO> findDoctors(org.springframework.data.domain.Pageable pageable) Finds doctors from the database.- Specified by:
findDoctorsin interfaceDoctorService- Parameters:
pageable- Pagination information, such as size and page number- Returns:
- A paginated sublist containing data transfer objects with doctors public information in the repository
-