Class EmployeesDAO
java.lang.Object
br.com.pethub.dao.EmployeesDAO
This class is responsible for managing the data access for the Employees in the application.
It provides methods to add, edit, delete, list, and search employees in the database.
It also provides a method to authenticate an employee.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEmployees
(Employees obj) This method is used to add a new employee to the database.void
deleteEmployees
(Employees obj) This method is used to delete an employee from the database.void
editEmployees
(Employees obj) This method is used to edit the details of an existing employee in the database.This method is used to retrieve a list of all employees from the database.This method searches for an employee in the database by CPF.searchEmployees
(String name) This method is used to search for employees by name.boolean
This method is used to authenticate an employee by email and password.
-
Constructor Details
-
EmployeesDAO
public EmployeesDAO()The constructor method of the EmployeesDAO class.
-
-
Method Details
-
addEmployees
This method is used to add a new employee to the database.- Parameters:
obj
- The employee to be added.
-
editEmployees
This method is used to edit the details of an existing employee in the database.- Parameters:
obj
- The employee with the updated details.
-
deleteEmployees
This method is used to delete an employee from the database.- Parameters:
obj
- The employee to be deleted.
-
listEmployees
-
searchEmployees
-
toLogin
This method is used to authenticate an employee by email and password.- Parameters:
email
- The email of the employee to authenticate.password
- The password of the employee to authenticate.- Returns:
- true if the employee is authenticated, false otherwise.
-
searchEmployeeByCPF
-