E function ( E arg0 ) { EntityManager loc0 = getEntityManager ( ) ; persistAndFlush ( arg0 ) ; Object loc1 = getId ( arg0 ) ; loc0 . detach ( arg0 ) ; return ( E ) loc0 . find ( arg0 . getClass ( ) , loc1 ) ; }
make an instance managed and persistent , synchronize the persistence context to the underlying database and finally find the persisted entity by its id . delegates to #persistandflush object then #find class , object with the #getid object entity id . helpful when ensuring that entity data is actually written and read from the underlying database correctly . concode_field_sep EntityManagerFactory entityManagerFactory concode_field_sep void flush concode_elem_sep E find concode_elem_sep Object persistAndGetId concode_elem_sep T persistAndGetId 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