public static List<NotificationDto> transformToDto(List<Notification> notifications){
  if (notifications == null) {
    throw new WebApplicationException("Null entity object cannot be converted to Dto object.",Status.INTERNAL_SERVER_ERROR);
  }
  List<NotificationDto> result=new ArrayList<NotificationDto>();
  for (  Notification notification : notifications) {
    result.add(transformToDto(notification));
  }
  return result;
}

public static List < NotificationDto > transformToDto ( List < Notification > notifications ) { if ( notifications == null ) { throw new WebApplicationException ( "Null entity object cannot be converted to Dto object." , Status . INTERNAL_SERVER_ERROR ) ; } List < NotificationDto > result = new ArrayList < NotificationDto > ( ) ; for ( Notification notification : notifications ) { result . add ( transformToDto ( notification ) ) ; } return result ; }
converts list of notification entity objects to list of notificationdto objects .
