I have a class that implement all my workflow method. At some pointing time, when the request is approved by the workflow, I need to update status in database. For this I need to call the respective service class to save the status. The following method is saving the status in db:
public void changeStatus(String employeeNumber, String carid,String Status) throws Exception {
Car car = carService.findCarByPrimaryKey(carid);
car.setStatus(Status);
carService.saveCarDetails(car);
}
I want to make this method generic since I don't have status for car only. I have to update status for different object depending from the application made. It can be for application for leave/parking...I can keep the field Status with the same name in all table. Please advise me how to proceed. Thanks