Subversion Repositories SmartDukaan

Rev

Rev 31490 | Rev 31495 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31490 Rev 31493
Line 244... Line 244...
244
 
244
 
245
			BrandCatalog brand = new BrandCatalog();
245
			BrandCatalog brand = new BrandCatalog();
246
			brand.setName(brandName);
246
			brand.setName(brandName);
247
			brand.setLogoUrl((String) mobileBrand.get("url"));
247
			brand.setLogoUrl((String) mobileBrand.get("url"));
248
			brandsRepository.persist(brand);
248
			brandsRepository.persist(brand);
-
 
249
 
-
 
250
			LOGGER.info("brand {}", brand);
-
 
251
 
249
			Double category = (Double) mobileBrand.get("categoryId");
252
			Double category = (Double) mobileBrand.get("categoryId");
250
 
253
 
251
			Double rank = (Double) mobileBrand.get("rank");
254
			Double rank = (Double) mobileBrand.get("rank");
-
 
255
 
252
			BrandCategory brandCategory = new BrandCategory();
256
			BrandCategory brandCategory = new BrandCategory();
253
			brandCategory.setActive((Boolean) mobileBrand.get("active"));
257
			brandCategory.setActive((Boolean) mobileBrand.get("active"));
254
			brandCategory.setCategoryId(category.toString());
258
			brandCategory.setCategoryId(category.intValue());
255
			brandCategory.setBrandId(brand.getId());
259
			brandCategory.setBrandId(brand.getId());
256
			brandCategory.setRank(rank.intValue());
260
			brandCategory.setRank(rank.intValue());
257
			brandCategoryRepository.persist(brandCategory);
261
			brandCategoryRepository.persist(brandCategory);
258
 
262
 
-
 
263
			LOGGER.info("brandCategory {}", brandCategory);
-
 
264
 
259
		}
265
		}
260
 
266
 
261
		return "add-remove-api";
267
		return "add-remove-api";
262
	}
268
	}
263
 
269