Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
1 views

Spring Boot JPA Assignment_173709

Uploaded by

abhishektomarcpr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Spring Boot JPA Assignment_173709

Uploaded by

abhishektomarcpr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Q1/- Consider the following Entity class:

Product:
productId: Integer
productName: String
quantity: Integer
price: Double
category: String //here category should be Stationary, Grocery, Electronics

● Implement the following interface and expose these Services using Rest API.

public interface ProductService{

public Product registerProduct(Product p)throws ProductException;


public List<Product> getAllProducts()throws ProductException;
public Prodcut updateProdcut(Product p)throws ProductException;
public Product deleteProductById(Integer pid)throws ProductException;
public List<Product> getsProductByCategory(String category)throws
ProductException;

public List<ProductDTO> getProductNameQtyPrice() throws


ProductException;

class ProductDTO{

productName:String
puantity: Integer
price: Double
}

Note: Make use of Layerd Architecture to develop the above application.

ProductException should be a checked exception

You might also like