Package com.masai.Dao

Interface ProductDao

All Known Implementing Classes:
ProductDaoImpl

public interface ProductDao
  • Method Details

    • updateQuantity

      boolean updateQuantity(int productId, int quantity)
      Updates the quantity of a product based on its product ID.
      Parameters:
      productId - The ID of the product.
      quantity - The new quantity of the product.
      Returns:
      true if the quantity was successfully updated, false otherwise.
    • getGStPercentage

      int getGStPercentage(int productId)
      Retrieves the GST percentage of a product based on its product ID.
      Parameters:
      productId - The ID of the product.
      Returns:
      The GST percentage of the product.
    • getProductById

      Product getProductById(int productId)
      Retrieves a product based on its product ID.
      Parameters:
      productId - The ID of the product.
      Returns:
      The product object.
    • updateProductBySeller

      boolean updateProductBySeller(Product product, int id)
      Updates a product by a seller.
      Parameters:
      product - The updated product object.
      id - The ID of the product to update.
      Returns:
      true if the product was successfully updated, false otherwise.
    • addProductBySeller

      boolean addProductBySeller(Product product)
      Adds a new product by a seller.
      Parameters:
      product - The product object to add.
      Returns:
      true if the product was successfully added, false otherwise.
    • getProductIdByCategoryName

      int getProductIdByCategoryName(String catgoryName)
      Retrieves the product ID based on the category name.
      Parameters:
      categoryName - The name of the category.
      Returns:
      The product ID associated with the category.
    • returnProduct

      boolean returnProduct(ReturnProduct returnProduct)
      Processes the return of a product.
      Parameters:
      returnProduct - The return product object.
      Returns:
      true if the return was successfully processed, false otherwise.