Class MenuDao

java.lang.Object
simu.Dao.MenuDao

public class MenuDao extends Object
Data Access Object (DAO) class for accessing menu items from the database.
  • Field Details

  • Constructor Details

    • MenuDao

      public MenuDao()
  • Method Details

    • getAllStarters

      public List<MenuItem> getAllStarters()
      Retrieves all starter items from the menu.
      Returns:
      a list of starter menu items
    • getAllMainMeals

      public List<MenuItem> getAllMainMeals()
      Retrieves all main meal items from the menu.
      Returns:
      a list of main meal menu items
    • getAllDesserts

      public List<MenuItem> getAllDesserts()
      Retrieves all dessert items from the menu.
      Returns:
      a list of dessert menu items
    • getRandomMealFromDb

      public MenuItem getRandomMealFromDb(int id)
      Retrieves a random meal item from the database based on the specified category ID.
      Parameters:
      id - the category ID
      Returns:
      a random menu item from the specified category