Move code over from astyanax-jpa.