code: public static TriggerDto transformToDto(Trigger trigger) {
          TriggerDto result = createDtoObject(TriggerDto.class, trigger);
  
          // Now copy ID fields
          result.setAlertId(trigger.getAlert().getId());
          for (Notification notification : trigger.getNotifications()) {
              result.addNotificationIds(notification);
          }
          return result;
      }
docs: Converts trigger entity to triggerDto object.
  
  @param   trigger  trigger entity. Cannot be null.
  
  @return  triggerDto.