public static List < AuditDto > transformToDto ( List < Audit > audits ) { if ( audits == null ) { throw new WebApplicationException ( "Null entity object cannot be converted to Dto object." , Status . INTERNAL_SERVER_ERROR ) ; } List < AuditDto > result = new ArrayList < AuditDto > ( ) ; for ( Audit audit : audits ) { result . add ( transformToDto ( audit ) ) ; } return result ; }
Converts a list of audit entities to DTOs .