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

public static List < AnnotationDto > transformToDto ( List < Annotation > annotations ) { if ( annotations == null ) { throw new WebApplicationException ( "Null entity object cannot be converted to Dto object." , Status . INTERNAL_SERVER_ERROR ) ; } List < AnnotationDto > result = new ArrayList < > ( ) ; for ( Annotation annotation : annotations ) { result . add ( transformToDto ( annotation ) ) ; } return result ; }
converts list of alert entity objects to list of alertdto objects .
