Personally I prefer some kind of business layer that takes care of these issues:
Code:
class EmployeeService{
@transactional
void fire(long id){
Employee e = employeeDao.load(id);
e.fire();
}
}
If you want to have a rich domain model, you can add the logic to the fire method of the employee, or create some kind of fire domain service (domain service is not the same as an application service.. see DDD for more information).
Code:
class EmployeeService{ // is application service
@transactional
void fire(long id){
Employee e = employeeDao.load(id);
fireService.fire(e); //fire service is domain service
}
}
When you are using some kind of session based or technology (like Hibernate) you don't have to call save/update (I really hate these names). You have to make sure that your objects are attached to the session, after that you don't need to worry about save/update anymore.