Class CustomersDAO
java.lang.Object
br.com.pethub.dao.CustomersDAO
This class is responsible for managing the data access for the Customers in the application.
It provides methods to add, edit, delete, list, and search customers in the database.
It also provides a method to generate a report of all customers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCustomer
(Customers obj) This method adds a customer to the database.void
This method generates a report of all customers in the database.consultCustomers
(String name) This method is used to consult a customer by name.void
deleteCustomer
(Customers obj) This method deletes a customer from the database.void
editCustomer
(Customers obj) This method edits a customer in the database.This method lists all customers in the database.searchCustomer
(String name) This method searches for a customer in the database by name.This method searches for a customer in the database by CPF.
-
Constructor Details
-
CustomersDAO
public CustomersDAO()The constructor method of the CustomersDAO class.
-
-
Method Details
-
addCustomer
This method adds a customer to the database.- Parameters:
obj
- The customer object to be added.
-
editCustomer
This method edits a customer in the database.- Parameters:
obj
- The customer object to be edited.
-
deleteCustomer
This method deletes a customer from the database.- Parameters:
obj
- The customer object to be deleted.
-
listCustomers
-
searchCustomer
-
searchCustomerByCPF
-
consultCustomers
-
clientsReport
public void clientsReport()This method generates a report of all customers in the database.
-