fssa-batch3 / fssa-batch3/sec_b_meena.subramanian__corejava_project_2
Update Product
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### User story :
> Products deatils are successfully updated and stored in databse.
### Pre-requisites
- [ ] complete feature 1- create product
- [ ] Category model
- [ ] Category DAO(findAll,findById)
- [ ] Category service(findAll,findById)
- [ ] product table
- [ ] product DAO (update)
- [ ] product service ( update )
#### Validations:
- [ ] Form Validation
* product null or empty
* categoryId <= 0
* price <=0
* name ( null, empty, pattern )
* description ( null, empty )
- [ ] Business Validation
* Check whether the Category ID is available in the Category table.
* Check whether the Category exists.
* check whetehr the productId exists or not
#### Messages:
* invalid categoryId
* invalid product object
* price cannot be zero or negetive
* Name cannot be null or empty
* Name should be match with the given pattern
* Description cannot be null or empty
* categoryId is not available
* productId does not exists.
#### Flow:
> Invalid When a Product's name is not in use or when the input provided does not meet the criteria, categories arise.
```mermaid
graph TD;
A(ProductService - int id, String name) --> B(Form Validation) -- Valid --> C(Business Validation)
B -- Invalid --> G(Validation Exception)
C -- Valid --> D(Argument Passed to ProductDAO)
D --> E(Store Value in Database)
C -- Invalid --> F(Validation Exception)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.