change database API from hibernate to JPA