Package com.masai.Dao

Interface TransactionDao

All Known Implementing Classes:
TransactionDaoImpl

public interface TransactionDao
  • Method Details

    • getAllTransactionIdByParticularBuyer

      List<Integer> getAllTransactionIdByParticularBuyer(String buyerUsername)
      Retrieves all transaction IDs associated with a particular buyer.
      Parameters:
      buyerUsername - The username of the buyer.
    • getProductNameAndProductIdAndQuantityAndDateByIdAndReturn

      List<String> getProductNameAndProductIdAndQuantityAndDateByIdAndReturn(int id)
      Retrieves the product name, product ID, quantity, and date of a transaction by its ID and return status.
      Parameters:
      id - The ID of the transaction.
      Returns:
      A list containing the product name, product ID, quantity, and date.
    • returnProductTransaction

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

      String alreadyReturnOrNot(int transactionId)
      Retrieves the return type for a given transaction ID.
      Parameters:
      transactionId - The transaction ID to check for return status.
      Returns:
      The return type ("YES" or "NO") for the specified transaction ID.