Package callofproject.dev.project.mapper
Interface IProjectMapper
public interface IProjectMapper
Mapper interface for mapping between Project entities and various project-related DTOs.
It provides mappings to convert between Project entity and DTOs like ProjectOverviewDTO,
ProjectDetailDTO, ProjectDiscoveryDTO, and ProjectOwnerViewDTO.
Additionally, it converts lists of these DTOs into their corresponding container DTOs.
-
Method Summary
Modifier and TypeMethodDescriptiontoProjectDetailDTO
(callofproject.dev.data.project.entity.Project project, List<callofproject.dev.nosql.entity.ProjectTag> projectTags, ProjectsParticipantDTO projectsParticipantDTO) Maps from Project entity and related data to ProjectDetailDTO.toProjectDiscoveryDTO
(callofproject.dev.data.project.entity.Project project) Maps from Project entity to ProjectDiscoveryDTO.toProjectDiscoveryDTO
(callofproject.dev.data.project.entity.Project project, String image) Maps from Project entity and image path to ProjectDiscoveryDTO.toProjectOverviewDTO
(callofproject.dev.data.project.entity.Project project, List<callofproject.dev.nosql.entity.ProjectTag> projectTags) Maps a Project entity and a list of ProjectTag entities to a ProjectOverviewDTO.default ProjectOverviewsDTO
toProjectOverviewsDTO
(List<ProjectOverviewDTO> projectOverviewDTOs) Wraps a list of ProjectOverviewDTOs into a ProjectOverviewsDTO.toProjectOwnerViewDTO
(callofproject.dev.data.project.entity.Project project, List<callofproject.dev.nosql.entity.ProjectTag> projectTags, ProjectsParticipantDTO projectsParticipantDTO) Maps from Project entity, list of ProjectTags, and ProjectsParticipantDTO to ProjectOwnerViewDTO.default ProjectsDetailDTO
toProjectsDetailDTO
(List<ProjectDetailDTO> projectDetailDTOs) Wraps a list of ProjectDetailDTOs into a ProjectsDetailDTO.default ProjectsDiscoveryDTO
toProjectsDiscoveryDTO
(List<ProjectDiscoveryDTO> projectDiscoveryDTOs) Wraps a list of ProjectDiscoveryDTOs into a ProjectsDiscoveryDTO.
-
Method Details
-
toProjectOverviewDTO
ProjectOverviewDTO toProjectOverviewDTO(callofproject.dev.data.project.entity.Project project, List<callofproject.dev.nosql.entity.ProjectTag> projectTags) Maps a Project entity and a list of ProjectTag entities to a ProjectOverviewDTO.- Parameters:
project
- The Project entity to map.projectTags
- The list of ProjectTag entities.- Returns:
- The mapped ProjectOverviewDTO.
-
toProjectOverviewsDTO
Wraps a list of ProjectOverviewDTOs into a ProjectOverviewsDTO.- Parameters:
projectOverviewDTOs
- The list of ProjectOverviewDTOs.- Returns:
- The ProjectOverviewsDTO containing the list.
-
toProjectDetailDTO
ProjectDetailDTO toProjectDetailDTO(callofproject.dev.data.project.entity.Project project, List<callofproject.dev.nosql.entity.ProjectTag> projectTags, ProjectsParticipantDTO projectsParticipantDTO) Maps from Project entity and related data to ProjectDetailDTO.- Parameters:
project
- The Project entity to be mapped.projectTags
- The list of associated ProjectTag entities.projectsParticipantDTO
- The ProjectsParticipantDTO containing project participants' information.- Returns:
- The mapped ProjectDetailDTO.
-
toProjectsDetailDTO
Wraps a list of ProjectDetailDTOs into a ProjectsDetailDTO.- Parameters:
projectDetailDTOs
- The list of ProjectDetailDTOs to wrap.- Returns:
- The ProjectsDetailDTO containing the list.
-
toProjectDiscoveryDTO
ProjectDiscoveryDTO toProjectDiscoveryDTO(callofproject.dev.data.project.entity.Project project, String image) Maps from Project entity and image path to ProjectDiscoveryDTO.- Parameters:
project
- The Project entity to be mapped.image
- The image path associated with the project.- Returns:
- The mapped ProjectDiscoveryDTO.
-
toProjectDiscoveryDTO
Maps from Project entity to ProjectDiscoveryDTO. Used when no image path is available.- Parameters:
project
- The Project entity to be mapped.- Returns:
- The mapped ProjectDiscoveryDTO.
-
toProjectsDiscoveryDTO
Wraps a list of ProjectDiscoveryDTOs into a ProjectsDiscoveryDTO.- Parameters:
projectDiscoveryDTOs
- The list of ProjectDiscoveryDTOs to wrap.- Returns:
- The ProjectsDiscoveryDTO containing the list.
-
toProjectOwnerViewDTO
ProjectOwnerViewDTO toProjectOwnerViewDTO(callofproject.dev.data.project.entity.Project project, List<callofproject.dev.nosql.entity.ProjectTag> projectTags, ProjectsParticipantDTO projectsParticipantDTO) Maps from Project entity, list of ProjectTags, and ProjectsParticipantDTO to ProjectOwnerViewDTO.- Parameters:
project
- The Project entity to be mapped.projectTags
- The list of associated ProjectTag entities.projectsParticipantDTO
- The ProjectsParticipantDTO containing project participants' information.- Returns:
- The mapped ProjectOwnerViewDTO.
-