Cleanup duplicate code by abstracting the majority of the JPA database code