question: make an instance managed and persistent then return it 's id . delegates to entitymanager #persist object then #getid object . helpful when setting up test data in a test : object entityid = this.testentitymanager.persist new myentity `` spring '' ; concode_field_sep EntityManagerFactory entityManagerFactory concode_field_sep E persistFlushFind concode_elem_sep void flush concode_elem_sep E find concode_elem_sep E merge concode_elem_sep void clear concode_elem_sep E refresh concode_elem_sep void detach concode_elem_sep Object getId concode_elem_sep T getId concode_elem_sep E persist concode_elem_sep EntityManager getEntityManager concode_elem_sep void remove concode_elem_sep E persistAndFlush
target: Object function ( Object arg0 ) { persist ( arg0 ) ; return getId ( arg0 ) ; }