return itemPriceDto;
}
@Override
public CalculationDto map(Calculation calculation, Class<CalculationDto> calculationDtoClass) {
CalculationDto calculationDto = new CalculationDto();
calculationDto.setId(calculation.getId());
calculationDto.setName(calculation.getName());
calculationDto.setPrice(new BigDecimal(calculation.getPrice()));
calculationDto.setBlueprintTypeID(calculation.getBlueprintTypeID());
calculationDto.setBlueprintTypeName(calculation.getBlueprintTypeName());
calculationDto.setProductTypeName(calculation.getProductTypeName());
calculationDto.setProductTypeID(calculation.getProductTypeID());
calculationDto.setProductTypeCategoryID(calculation.getProductTypeCategoryID());
calculationDto.setProductGraphicIcon(calculation.getProductGraphicIcon());
calculationDto.setProductivityLevel(calculation.getProductivityLevel());
calculationDto.setMaterialLevel(calculation.getMaterialLevel());
calculationDto.setWasteFactor(calculation.getWasteFactor());
List<CalculationItemDto> calculationItemDtos = new ArrayList<CalculationItemDto>();
for (CalculationItem calculationItem : calculation.getItems()) {
calculationItemDtos.add(map(calculationItem, CalculationItemDto.class));
}
calculationDto.setItems(calculationItemDtos);
return calculationDto;
}