code: public static NotificationDto transformToDto(Notification notification) {
          if (notification == null) {
              throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
          }
  
          NotificationDto result = createDtoObject(NotificationDto.class, notification);
  
          result.setAlertId(notification.getAlert().getId());
          for (Trigger trigger : notification.getTriggers()) {
              result.addTriggersIds(trigger);
          }
          return result;
      }
docs: Converts notification entity object to notificationDto object.
  
  @param   notification  notification entity. Cannot be null.
  
  @return  notificationDto.
  
  @throws  WebApplicationException  If an error occurs.