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

public static List < HistoryDTO > transformToDto ( List < History > list ) { if ( list == null ) { throw new WebApplicationException ( "Null entity object cannot be converted to Dto object." , Status . INTERNAL_SERVER_ERROR ) ; } List < HistoryDTO > result = new ArrayList < HistoryDTO > ( ) ; for ( History history : list ) { result . add ( transformToDto ( history ) ) ; } return result ; }
converts a list of history entities to dtos .
