Interface StudentDTOMapper
public interface StudentDTOMapper
A mapper interface for converting between Student domain model and its corresponding DTOs. Uses MapStruct for automatic mapping.
-
Method Summary
Modifier and TypeMethodDescriptionConverts aCreateStudentRequest
DTO to aStudent
domain model.studentToCreateStudentResponse
(Student student) Converts aStudent
model to aCreateStudentResponse
DTO.studentToGetStudentResponse
(Student student) Converts aStudent
domain model to aGetStudentResponse
DTO.Converts aUpdateStudentRequest
DTO to aStudent
domain model.
-
Method Details
-
createStudentRequestToStudent
Converts aCreateStudentRequest
DTO to aStudent
domain model.- Parameters:
request
- the DTO containing student creation details- Returns:
- the corresponding
Student
model
-
updateStudentRequestToStudent
Converts aUpdateStudentRequest
DTO to aStudent
domain model.- Parameters:
request
- the DTO containing updated student details- Returns:
- the corresponding
Student
model
-
studentToCreateStudentResponse
Converts aStudent
model to aCreateStudentResponse
DTO.- Parameters:
student
- the created student model- Returns:
- the corresponding
CreateStudentResponse
DTO
-
studentToGetStudentResponse
Converts aStudent
domain model to aGetStudentResponse
DTO.- Parameters:
student
- the student model to convert- Returns:
- the corresponding
GetStudentResponse
DTO
-
pageStudentToPageDtoGetTutorResponse
- Parameters:
page
- the paginated student entities- Returns:
- a paginated response DTO containing student data
-