fssa-batch3 / fssa-batch3/sec_b_vignesh.ramachandran__corejava_project_2
FindAll Dishes By menu_id & category_id
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### Feature 6: FindAll Dishes By menu_id & category_id
#### Admin story
Admin can find all Dishes by menu_id and category_id.
#### Pre-requisites:
- Implement Category_Dish Service findDishesByMenuIdCategoryId(int menu_id, int category_id)
- Implement Category_Dish findDishesByMenuIdCategoryId(int menu_id, int category_id)
- Complete Dish Service(findById)- int dish_id
- Complete Dish DAO(findById)- int dish_id
#### Validation
- [ ] Form Validation
- menu_id <=0
- category_id <=0
- [ ] Business Validation
- Check menu_id is in the table or not
- Check category_id is in the table or not
#### Messages
- Invalid menu_id
- Invalid category_id
- menu_id not found (Business Validation)
- category_id not found (Business Validation)
#### Flow:
```mermaid
graph TD;
A["Category_Dish Service: findBymenuIdAndCategoryId(int menu_id, int category_id)"] --> B["Input Validation"]
B -- Valid --> B1["Business Validation"]
B -- Invlaid--> B2["Validation Exception: Invalid Input"]
B1 --> B3["Category_Dish Service:findBymenuIdAndCategoryId(int menu_id, int category_id)"]
B3 --> C["Check menu_id is in the table or not"]
C -- Yes --> D["Check category_id is in the table or not"]
C -- No --> D1["Validation Exception: menu_id not found"]
D -- Yes --> E["Category_Dish DAO: findBymenuIdAndCategoryId(int menu_id, int category_id)"]
D -- No --> E1["Validation Exception: category_id not found"]
E --> F["Store all dish_id in the dishIdList"]
F --> G["Dish DAO: findById(int dish_id)"]
G --> H["dishList created"]
H --> I["Store all dish details in the dishList"]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Category_Dish Service and DAO methods named findDishesByMenuIdCategoryId, then inspect the Dish Service and DAO findById methods. Trace the existing validation and exception patterns before implementing the requested flow. Done means valid IDs return the matching dish list, while nonpositive or missing menu and category IDs produce the specified validation messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100