Refactor Spring Hibernate