Class MenuDao
java.lang.Object
simu.Dao.MenuDao
Data Access Object (DAO) class for accessing menu items from the database.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves all dessert items from the menu.Retrieves all main meal items from the menu.Retrieves all starter items from the menu.getRandomMealFromDb(int id) Retrieves a random meal item from the database based on the specified category ID.
-
Field Details
-
conn
-
-
Constructor Details
-
MenuDao
public MenuDao()
-
-
Method Details
-
getAllStarters
-
getAllMainMeals
-
getAllDesserts
-
getRandomMealFromDb
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
-