fssa-batch3 / fssa-batch3/sec_b_boobalan.ravichandran__corejava_project_2

Create Product

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Feature : Create Product and Price
>Create a new product in a database.
#### Pre-requisites:
- [ ] Complete Category type module Feature 1
- [ ] Complete Category module Feature 1
- [ ] Category DAO
- [ ] Category service
- [ ] Price table
- [ ] Price model
- [ ] Price DAO( create )
- [ ] Price service ( create )
- [ ] Product table
- [ ] Product model
- [ ] Product DAO( create )
- [ ] Product service ( create )
#### Validations:
- [ ] Form Validation(Product)
* product null
* category Id <=0
* Product name (null or empty string)
* quantity Unit (null or empty string)
* description(null or empty string)
* benefits(null or empty string)
* Application(null or empty string)
* manufacture company(null or empty string)
- [ ] Business Validation(Product)
* Check whether the category ID is available or not in the Category table
* Check whether the product already exists

- [ ] Form Validation(Price)
* price object null
* product Id <=0
* price>=50 && price <=10000
- [ ] Business Validation(Price)
* Check whether the Product ID is available or not in the Product table

#### Messages:(Product)

* Invalid Product object
* Invalid Category Id
* Product name cannot be null or empty
* quantity unit cannot be null or empty
* description cannot be null or empty
* benefits cannot be null or empty
* Application cannot be null or empty
* manufacture company cannot be null or empty
* Category is not Available
* The product is already exists

#### Messages:(Price)
* Invalid Price object
* Invalid product id
* Price should be between a minimum of 100 and a maximum of 10000.
* The product is not available.

#### Flow:
```mermaid
graph TD;
A(Argument Passed to ProductService: Create - Product Object) --> B(Form Validation - Product)
B--Valid--> C(Business Validation - Product)
B--Invalid-->I(Throw Validation Exception)
C -- Valid --> E(Argument Passed to ProductDAO)
E --> F(Store Value in Database)
C -- Invalid --> H(Throw Validation Exception)
F --> G(Argument Passed to PriceService: Create - Price Object)
G --> K(Form Validation - Price)-- valid --> L(Business Validation - Price)
K-- Invalid--> M(Throw Validation Exception)
L--Valid-->O(Argument Passed to PriceDAO)-->P(Store Value in Database)
L--Invalid-->R(Throw Validation Exception)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.