hibernate refactor