Package com.masai.Dao
Interface TransactionDao
- All Known Implementing Classes:
TransactionDaoImpl
public interface TransactionDao
-
Method Summary
Modifier and TypeMethodDescriptionalreadyReturnOrNot
(int transactionId) Retrieves the return type for a given transaction ID.getAllTransactionIdByParticularBuyer
(String buyerUsername) Retrieves all transaction IDs associated with a particular buyer.Retrieves the product name, product ID, quantity, and date of a transaction by its ID and return status.boolean
returnProductTransaction
(ReturnProduct returnProduct) Processes the return of a product as a transaction.
-
Method Details
-
getAllTransactionIdByParticularBuyer
Retrieves all transaction IDs associated with a particular buyer.- Parameters:
buyerUsername
- The username of the buyer.
-
getProductNameAndProductIdAndQuantityAndDateByIdAndReturn
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
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
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.
-