Class NotificationMapper

java.lang.Object
edu.ntnu.idatt2106_2023_06.backend.mapper.NotificationMapper

public class NotificationMapper extends Object
The NotificationMapper class contains methods for mapping between Notification model and DTO.
  • Constructor Details

    • NotificationMapper

      public NotificationMapper()
  • Method Details

    • toNotificationDTO

      public static List<NotificationDTO> toNotificationDTO(List<Notification> notifications)
      This method converts a list of notifications to a list of notificationDTOs.
      Parameters:
      notifications - List of Notification objects
      Returns:
      List of NotificationDTO objects
    • toNotificationDTO

      public static NotificationDTO toNotificationDTO(Notification notification)
      This method converts a Notification object to a NotificationDTO object.
      Parameters:
      notification - Notification object to be converted
      Returns:
      NotificationDTO object