Using JPA APIs to manage data