while(recipesIdIter.hasNext()){
Integer i =recipesIdIter.next();
Recipe r = recipeService.getRecipe(i.intValue());
rList.add(r);
Ingredient4Recipe i4r = new Ingredient4Recipe();
i4r.setRecipeId(r.getRecipeId());
ArrayList<Ingredient4Recipe> i4rList = ingredientService.getIngredientsForRecipe(i4r);
Iterator<Ingredient4Recipe> i4rIter = i4rList.iterator();
while (i4rIter.hasNext()){
i4r = i4rIter.next();
if(ingHT.containsKey(i4r.getName())){
Ingredient4Recipe i4rTmp = (Ingredient4Recipe) ingHT.get(i4r.getName());
i4rTmp.setQuantity(i4rTmp.getQuantity()+i4r.getQuantity());
ingHT.put(i4rTmp.getName(), i4rTmp);
}else{
ingHT.put(i4r.getName(), i4r);
}
}