Hibernate API directly usage is changed to JPA usage