Package com.masai.Dao

Interface AdminDao

All Known Implementing Classes:
AdminDaoImpl

public interface AdminDao
  • Method Details

    • loginAdmin

      Boolean loginAdmin(String adminId, String password)
      Login as an admin.
      Parameters:
      adminId - The admin ID.
      password - The admin password.
      Returns:
      True if the login is successful, False otherwise.
      Throws:
      InvalidCredentialsException - If the admin ID or password is invalid.
    • getAllBuyer

      ResultSet getAllBuyer() throws RecordNotFoundException
      Retrieve all active buyers.
      Returns:
      A ResultSet containing information about all active buyers.
      Throws:
      RecordNotFoundException - If no active buyers are found.
    • getAllSeller

      ResultSet getAllSeller()
      Retrieve all active sellers.
      Returns:
      A ResultSet containing information about all active sellers.
      Throws:
      RecordNotFoundException - If no active sellers are found.
    • getAllProducts

      ResultSet getAllProducts() throws RecordNotFoundException
      Retrieve all products.
      Returns:
      A ResultSet containing information about all products.
      Throws:
      RecordNotFoundException - If no products are found.
    • getAllSoldProducts

      ResultSet getAllSoldProducts() throws RecordNotFoundException
      Retrieve all sold products.
      Returns:
      A ResultSet containing information about all sold products.
      Throws:
      RecordNotFoundException - If no sold products are found.
    • getAllProductsByCategory

      ResultSet getAllProductsByCategory(String CatName) throws RecordNotFoundException
      Retrieve all products belonging to a specific category.
      Parameters:
      categoryName - The name of the category.
      Returns:
      A ResultSet containing information about all products in the specified category.
      Throws:
      RecordNotFoundException - If no products are found in the specified category.
    • getAllProductsBySellerUsername

      ResultSet getAllProductsBySellerUsername(String username) throws RecordNotFoundException
      Retrieve all products belonging to a specific seller's username.
      Parameters:
      username - The username of the seller.
      Returns:
      A ResultSet containing information about all products belonging to the specified seller.
      Throws:
      RecordNotFoundException - If no products are found for the specified seller.
    • getAllProductsByInAccendingOrderByPrice

      ResultSet getAllProductsByInAccendingOrderByPrice() throws RecordNotFoundException
      Retrieve all products sorted in ascending order of price.
      Returns:
      A ResultSet containing information about all products sorted by price in ascending order.
      Throws:
      RecordNotFoundException - If no products are found.
    • getAllProductsByQuantity

      ResultSet getAllProductsByQuantity(int from, int to) throws RecordNotFoundException
      Retrieve all products within a specified quantity range.
      Parameters:
      from - The minimum quantity.
      to - The maximum quantity.
      Returns:
      A ResultSet containing information about all products within the specified quantity range.
      Throws:
      RecordNotFoundException - If no products are found within the specified quantity range.
    • getAllTransaction

      ResultSet getAllTransaction() throws RecordNotFoundException
      Retrieve all transactions.
      Returns:
      A ResultSet containing information about all transactions.
      Throws:
      RecordNotFoundException - If no transactions are found.
    • getAllTransactionbyDateRange

      ResultSet getAllTransactionbyDateRange(LocalDate startDate, LocalDate endDate) throws RecordNotFoundException
      Retrieve all transactions within a specific date range.
      Parameters:
      startDate - The start date of the range.
      endDate - The end date of the range.
      Returns:
      A ResultSet containing information about all transactions within the specified date range.
      Throws:
      RecordNotFoundException - If no transactions are found within the specified date range.
    • getTransactionById

      ResultSet getTransactionById(int id) throws RecordNotFoundException
      Retrieve a transaction by its ID.
      Parameters:
      id - The ID of the transaction.
      Returns:
      A ResultSet containing information about the transaction with the specified ID.
      Throws:
      RecordNotFoundException - If no transaction is found with the specified ID.
    • getAllTransactionByPurchaseDate

      ResultSet getAllTransactionByPurchaseDate() throws RecordNotFoundException
      Retrieve all transactions sorted by purchase date.
      Returns:
      A ResultSet containing information about all transactions sorted by purchase date.
      Throws:
      RecordNotFoundException - If no transactions are found.
    • getAllTransactionByQuantity

      ResultSet getAllTransactionByQuantity() throws RecordNotFoundException
      Retrieve all transactions sorted by quantity.
      Returns:
      A ResultSet containing information about all transactions sorted by quantity.
      Throws:
      RecordNotFoundException - If no transactions are found.
    • getAllTransactionByGSTPercentage

      ResultSet getAllTransactionByGSTPercentage() throws RecordNotFoundException
      Retrieve all transactions sorted by GST percentage.
      Returns:
      A ResultSet containing information about all transactions sorted by GST percentage.
      Throws:
      RecordNotFoundException - If no transactions are found.
    • getAllTransactionByTotalPrice

      ResultSet getAllTransactionByTotalPrice() throws RecordNotFoundException
      Retrieve all transactions sorted by total price.
      Returns:
      A ResultSet containing information about all transactions sorted by total price.
      Throws:
      RecordNotFoundException - If no transactions are found.