Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private List<CompensationDTO> mapToDTO(List<Claims> claims) {
- List<CompensationsDTO> compensations = new ArrayList<>();
- if (claims.isEmpty()) {
- return new ArrayList<>();
- }
- for (Claim claim : claims) {
- CompensationDTO compensationDTO = new CompensationDTO();
- compensationDTO.setId(claim.getId());
- compensationDTO.setAmount(claim.getAmount());
- compensationDTO.setType(claim.getType());
- compensations.add(compensationDTO);
- mapToDTO(claim.getChildrenClaims());
- }
- return compensations;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement