make an instance managed and persistent then return it 's id . delegates to entitymanager #persist object then #getid object , class . helpful when setting up test data in a test : long entityid = this.testentitymanager.persist new myentity `` spring '' , long.class ; 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
T function ( Object arg0 , Class < T > arg1 ) { persist ( arg0 ) ; return getId ( arg0 , arg1 ) ; }