Пример #1
0
 /**
  * Gets the currently referenced Recipe of this instance.
  *
  * @return the Recipe currently referenced in this RecipeIngredient.
  */
 public RecipeBO getRecipe() {
   if (_recipe == null) {
     _recipe = new RecipeBO(_model.getRecipe());
   }
   return _recipe;
 }
Пример #2
0
 /**
  * Gets the currently referenced Ingredient of this instance.
  *
  * @return the Recipe currently referenced in this RecipeIngredient.
  */
 public RecipeBO getIngredient() {
   if (_ingredient == null) {
     _ingredient = new RecipeBO(_model.getIngredient());
   }
   return _ingredient;
 }
Пример #3
0
 /**
  * Sets the Ingredient to be referenced in this instance
  *
  * @param ingredient the Recipe to reference in this RecipeIngredient.
  */
 public void setIngredient(RecipeBO ingredient) {
   _ingredient = ingredient;
   _model.setIngredient(ingredient.getModel());
 }
Пример #4
0
 /**
  * Sets the amount of this instance.
  *
  * @param amount the new amount of this instance.
  */
 public void setAmount(float amount) {
   _model.setAmount(amount);
 }
Пример #5
0
 /**
  * Gets the amount of this instance.
  *
  * @return the amount currently set for this instance.
  */
 public float getAmount() {
   return _model.getAmount();
 }
Пример #6
0
 /**
  * Sets the recipeIngredientId of this instance.
  *
  * @param recipeIngredientId the new recipeIngredientId of this instance.
  */
 public void setRecipeIngredientId(long recipeIngredientId) {
   _model.setRecipeIngredientId(recipeIngredientId);
 }
Пример #7
0
 /**
  * Gets the recipeIngredientId of this instance.
  *
  * @return the recipeIngredientId currently set for this instance.
  */
 public long getRecipeIngredientId() {
   return _model.getRecipeIngredientId();
 }
Пример #8
0
 /**
  * Sets the Recipe to be referenced in this instance
  *
  * @param recipe the Recipe to reference in this RecipeIngredient.
  */
 public void setRecipe(RecipeBO recipe) {
   _recipe = recipe;
   _model.setRecipe(recipe.getModel());
 }