@ Override public void create ( TaskRecord taskRecord ) throws Exception { Task task = new Task ( taskRecord ) ; EntityManager em = getPersistenceServiceUnit ( ) . createEntityManager ( ) ; try { em . persist ( task ) ; em . flush ( ) ; taskRecord . setId ( task . ID ) ; } finally { em . close ( ) ; } }
Create an entry in the persistent store for a new task .