Subversion Repositories SmartDukaan

Rev

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

Rev 31488 Rev 31489
Line 245... Line 245...
245
			Brand brand = new Brand();
245
			Brand brand = new Brand();
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
			Double category = (Double) mobileBrand.get("categoryId");
249
			Double category = (Double) mobileBrand.get("categoryId");
-
 
250
 
-
 
251
			Double rank = (Double) mobileBrand.get("rank");
250
			BrandCategory brandCategory = new BrandCategory();
252
			BrandCategory brandCategory = new BrandCategory();
251
			brandCategory.setActive((Boolean) mobileBrand.get("active"));
253
			brandCategory.setActive((Boolean) mobileBrand.get("active"));
252
			brandCategory.setCategoryId(category.toString());
254
			brandCategory.setCategoryId(category.toString());
253
			brandCategory.setBrandId(brand.getId());
255
			brandCategory.setBrandId(brand.getId());
254
			brandCategory.setRank((int) mobileBrand.get("rank"));
256
			brandCategory.setRank(rank.intValue());
255
			brandCategoryRepository.persist(brandCategory);
257
			brandCategoryRepository.persist(brandCategory);
256
 
258
 
257
		}
259
		}
258
 
260
 
259
		return "add-remove-api";
261
		return "add-remove-api";