Class ItemSaleDAO
java.lang.Object
br.com.pethub.dao.ItemSaleDAO
This class is responsible for managing the data access for the ItemSale in the application.
It provides methods to add items to a sale and list items in a sale.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method is used to add an item to a sale.void
deleteItemsSaleByCustomerId
(int customerId) This method is used to delete all items from a sale by customer ID.ListItemSales
(int sale_Id) This method is used to list all items in a sale.
-
Constructor Details
-
ItemSaleDAO
public ItemSaleDAO()The constructor method of the ItemSaleDAO class.
-
-
Method Details
-
addItem
This method is used to add an item to a sale.- Parameters:
obj
- The ItemSale object to be added.
-
ListItemSales
-
deleteItemsSaleByCustomerId
public void deleteItemsSaleByCustomerId(int customerId) This method is used to delete all items from a sale by customer ID.- Parameters:
customerId
- The ID of the customer.
-