Subversion Repositories SmartDukaan

Rev

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

Rev 21431 Rev 21435
Line 123... Line 123...
123
			}catch(ProfitMandiBusinessException profitMandiBusinessException){
123
			}catch(ProfitMandiBusinessException profitMandiBusinessException){
124
				
124
				
125
			}
125
			}
126
			for(Category category : createRetailerRequest.getCategories()){
126
			for(Category category : createRetailerRequest.getCategories()){
127
				for(com.spice.profitmandi.web.req.Brand brandModel : category.getBrands()){
127
				for(com.spice.profitmandi.web.req.Brand brandModel : category.getBrands()){
128
					Brand brand = brandRepository.selectByName(brandModel.getName());
128
					Brand brand = brandRepository.selectByIdAndName(brandModel.getId(), brandModel.getName());
129
					final RetailerBrand retailerBrand = new RetailerBrand();
129
					final RetailerBrand retailerBrand = new RetailerBrand();
130
					retailerBrand.setRetailerId(retailer.getId());
130
					retailerBrand.setRetailerId(retailer.getId());
131
					retailerBrand.setBrandId(brand.getId());
131
					retailerBrand.setBrandId(brand.getId());
132
					retailerBrandRepository.persist(retailerBrand);
132
					retailerBrandRepository.persist(retailerBrand);
133
				}
133
				}