Class EmployeeSQL
java.lang.Object
csce331.group13.project2.backend.EmployeeSQL
Provides data access methods for employee records in the database.
Handles all CRUD operations for the employees table.
- Author:
- Varish Kongara
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddEmployee(Employee employee) Adds a new employee to the database.static booleandeleteEmployee(UUID employeeId) Deletes an employee from the database by their unique identifier.Retrieves all active employees from the database.Retrieves all employees from the database, including inactive ones.getEmployeeById(UUID employeeId) Retrieves an employee by their unique identifier.static booleanupdateEmployee(Employee employee) Updates an existing employee's information in the database.
-
Constructor Details
-
EmployeeSQL
public EmployeeSQL()
-
-
Method Details
-
addEmployee
Adds a new employee to the database.- Parameters:
employee- The Employee object to add.- Returns:
- true if the employee was successfully added; false otherwise.
-
getActiveEmployees
-
getAllEmployees
-
getEmployeeById
-
updateEmployee
Updates an existing employee's information in the database.- Parameters:
employee- The Employee object with updated values.- Returns:
- true if the update was successful; false otherwise.
-
deleteEmployee
Deletes an employee from the database by their unique identifier.- Parameters:
employeeId- The UUID of the employee to delete.- Returns:
- true if the deletion was successful; false otherwise.
-