use of com.ncedu.fooddelivery.api.v1.dto.product.ProductDTO in project 2021-msk-food-delivery by netcracker-edu.
the class ProductUtils method createProductUpdateDTO.
public static ProductUpdateDTO createProductUpdateDTO(Product p) {
ProductUpdateDTO productDTO = new ProductUpdateDTO();
productDTO.setDescription(p.getDescription());
productDTO.setPrice(p.getPrice());
productDTO.setName(p.getName());
productDTO.setWeight(p.getWeight());
productDTO.setExpirationDays(p.getExpirationDays());
return productDTO;
}
Aggregations