private void prepareProductSkuCollection(final Product product, final ProductDTO productDTO) { if (isProductSkusClearCollection || !product.getProductType().isWithMultipleSkus()) { Map<String, ProductSku> productSkuMap = new HashMap<String, ProductSku>(); for (ProductSkuDTO productSkuDTO : productDTO.getProductSkus()) { ProductSku productSku = product.getSkuByGuid(productSkuDTO.getGuid()); if (productSku != null) { productSkuMap.put(productSkuDTO.getSkuCode(), productSku); } } product.setProductSkus(productSkuMap); } }
@Override protected void setImportStatus(final ProductDTO object) { getStatusHolder().setImportStatus("(" + object.getCode() + ")"); }
@Override protected Product findPersistentObject(final ProductDTO dto) { return productDao.findByGuid(dto.getCode(), null); }
@Override protected String getDtoGuid(final ProductDTO dto) { return dto.getCode(); }