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 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

      default ProjectOverviewsDTO toProjectOverviewsDTO(List<ProjectOverviewDTO> projectOverviewDTOs)
      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

      default ProjectsDetailDTO toProjectsDetailDTO(List<ProjectDetailDTO> projectDetailDTOs)
      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

      ProjectDiscoveryDTO toProjectDiscoveryDTO(callofproject.dev.data.project.entity.Project project)
      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

      default ProjectsDiscoveryDTO toProjectsDiscoveryDTO(List<ProjectDiscoveryDTO> projectDiscoveryDTOs)
      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.