Converting a Java project to a JPA project