Implement the update() method in AbstractBaseDao class + unit tests + misc refactorings.