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

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