Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. private List<CompensationDTO> mapToDTO(List<Claims> claims) {
  2. List<CompensationsDTO> compensations = new ArrayList<>();
  3. if (claims.isEmpty()) {
  4. return new ArrayList<>();
  5. }
  6. for (Claim claim : claims) {
  7. CompensationDTO compensationDTO = new CompensationDTO();
  8. compensationDTO.setId(claim.getId());
  9. compensationDTO.setAmount(claim.getAmount());
  10. compensationDTO.setType(claim.getType());
  11. compensations.add(compensationDTO);
  12. mapToDTO(claim.getChildrenClaims());
  13. }
  14. return compensations;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement