Class SuppliersDAO

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

public class SuppliersDAO extends Object
This class is responsible for managing the data access for the Suppliers in the application. It provides methods to add, edit, delete suppliers, list suppliers, search suppliers by name, and consult suppliers.
  • Constructor Details

    • SuppliersDAO

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

    • addSuppliers

      public void addSuppliers(Suppliers obj)
      This method is used to add a supplier to the database.
      Parameters:
      obj - The supplier to be added.
    • editSuppliers

      public void editSuppliers(Suppliers obj)
      This method is used to edit a supplier in the database.
      Parameters:
      obj - The supplier with the updated details.
    • deleteSuppliers

      public void deleteSuppliers(Suppliers obj)
      This method is used to delete a supplier from the database.
      Parameters:
      obj - The supplier to be deleted.
    • listSuppliers

      public List<Suppliers> listSuppliers()
      This method is used to retrieve a list of all suppliers from the database.
      Returns:
      A list of all suppliers.
    • searchSuppliers

      public List<Suppliers> searchSuppliers(String name)
      This method is used to search for suppliers by name.
      Parameters:
      name - The name of the supplier to search for.
      Returns:
      A list of suppliers that match the provided name.
    • consultSuppliers

      public Suppliers consultSuppliers(String name)
      This method is used to consult a supplier by name.
      Parameters:
      name - The name of the supplier to consult.
      Returns:
      The supplier that matches the provided name, or null if no match is found.