Class ItemSaleDAO

java.lang.Object
br.com.pethub.dao.ItemSaleDAO

public class ItemSaleDAO extends Object
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 Details

    • ItemSaleDAO

      public ItemSaleDAO()
      The constructor method of the ItemSaleDAO class.
  • Method Details

    • addItem

      public void addItem(ItemSale obj)
      This method is used to add an item to a sale.
      Parameters:
      obj - The ItemSale object to be added.
    • ListItemSales

      public List<ItemSale> ListItemSales(int sale_Id)
      This method is used to list all items in a sale.
      Parameters:
      sale_Id - The ID of the sale.
      Returns:
      A list of ItemSale objects.
    • 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.