Rework API to improve JPA / Hibernate performance