Persistence injection and a re-write on opennms-model objects to fit JPA.