Class RecipeStep

java.lang.Object
no.ntnu.idatt1002.demo.data.RecipeStep
All Implemented Interfaces:
Storable

public class RecipeStep extends Object implements Storable
This class is representing an instruction for a recipe.
  • Field Details

    • stepId

      private int stepId
    • recipeId

      private int recipeId
    • stepNumber

      private int stepNumber
    • instruction

      private String instruction
  • Constructor Details

    • RecipeStep

      public RecipeStep(int stepId, int recipeId, int stepNumber, String instruction)
      Constructor for the RecipeStep class. When creating a new recipe step, the id is not known.
      Parameters:
      recipeId - the id of the recipe
      stepNumber - the number of the step
      instruction - the instruction of the step
    • RecipeStep

      public RecipeStep(int recipeId, int stepNumber, String instruction)
      Constructor for the RecipeStep class. When creating a new recipe step, the id is not known.
      Parameters:
      recipeId - the id of the recipe
      stepNumber - the number of the step
      instruction - the instruction of the step
  • Method Details

    • getStepId

      public int getStepId()
      Getter for the step id.
      Returns:
      the step id
    • getRecipeId

      public int getRecipeId()
      Getter for the recipe id.
      Returns:
      the recipe id
    • getStepNumber

      public int getStepNumber()
      Getter for the step number.
      Returns:
      the step number
    • getInstruction

      public String getInstruction()
      Getter for the instruction.
      Returns:
      the instruction
    • getAttributes

      public List<String> getAttributes()
      Returns the attributes of the recipe step.
      Specified by:
      getAttributes in interface Storable
      Returns:
      the attributes of the recipe step
    • getAttributeNames

      public List<String> getAttributeNames()
      Returns the attribute names of the recipe step.
      Specified by:
      getAttributeNames in interface Storable
      Returns:
      the attribute names of the recipe step
    • getId

      public int getId()
      Returns the id of the recipe step.
      Specified by:
      getId in interface Storable
      Returns:
      the id of the recipe step
    • getIdName

      public String getIdName()
      Returns the name of the id.
      Specified by:
      getIdName in interface Storable
      Returns:
      the name of the id