public void saveRecipeData(receipeFormBean formBean,List<ingredientFormBean> ingredientFormBean) {
		boolean masterResult = true,detailResult = true;
		
		// Check dual data
		if (masterAccess.getRecipeMaster(formBean.getRecipeName().trim()).length()  <= 0) {
			// insert data
			if (ingredientFormBean.size() > 0 ) {
				
				//insert master data
				recipeMasterBean masterBean = new recipeMasterBean();
				
				masterBean.setLink(formBean.getLink().trim());
				masterBean.setCountry(formBean.getCountry().trim());
				masterBean.setRecipeName(formBean.getRecipeName().trim());
				masterResult = masterAccess.insertRecipeMaster(masterBean);
				
				// insert detail data
				if (masterResult) {
					for (int i = 0; i < ingredientFormBean.size(); i++) {
						recipeDetailBean detailBean = new recipeDetailBean();
						
						ingredientFormBean inBean = ingredientFormBean.get(i);	
						// insert detail
						detailBean.setRecipeName(masterBean.getRecipeName().trim());
						detailBean.setIngredientName(inBean.getIngredientnameIn().trim());
						detailBean.setIngredientAmount(inBean.getIngredientamountIn().trim());
						// don't insert null ingredientname
						if (detailBean.getIngredientName().length() > 0) {
							//check detail dual
							if (detailAccess.getRecipeDetailByIngredientName(detailBean).size() == 0) {
								detailResult = detailAccess.insertRecipeDetail(detailBean);
								if (!detailResult) {
									break;
								}
							}
						}
					}
				}
			}
		}
		
		
		if (masterResult && detailResult) {
			masterAccess.udpateRecipeMaster(formBean.getRecipeName().trim());
			detailAccess.udpateRecipeDetail(formBean.getRecipeName().trim());
		}
	}