Class NotificationMapper
java.lang.Object
edu.ntnu.idatt2106_2023_06.backend.mapper.NotificationMapper
The NotificationMapper class contains methods for mapping between Notification model and DTO.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NotificationDTO
toNotificationDTO
(Notification notification) This method converts a Notification object to a NotificationDTO object.static List<NotificationDTO>
toNotificationDTO
(List<Notification> notifications) This method converts a list of notifications to a list of notificationDTOs.
-
Constructor Details
-
NotificationMapper
public NotificationMapper()
-
-
Method Details
-
toNotificationDTO
This method converts a list of notifications to a list of notificationDTOs.- Parameters:
notifications
- List of Notification objects- Returns:
- List of NotificationDTO objects
-
toNotificationDTO
This method converts a Notification object to a NotificationDTO object.- Parameters:
notification
- Notification object to be converted- Returns:
- NotificationDTO object
-