}
@Override
public void save() {
EntityManager em = ResourceUtils.getEntityManager();
GFac_Job_Data existingGfacJobData = em.find(GFac_Job_Data.class, localJobID);
em.close();
em = ResourceUtils.getEntityManager();
em.getTransaction().begin();
GFac_Job_Data gFacJobData = new GFac_Job_Data();
Experiment_Data experiment_data = em.find(Experiment_Data.class, experimentDataResource.getExperimentID());
gFacJobData.setExperiment_data(experiment_data);
gFacJobData.setExperiment_ID(experimentDataResource.getExperimentID());
Workflow_Data workflow_data = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
gFacJobData.setWorkflow_Data(workflow_data);
gFacJobData.setWorkflow_instanceID(workflowDataResource.getWorkflowInstanceID());
gFacJobData.setNode_id(nodeID);
gFacJobData.setApplication_descriptor_ID(applicationDescID);
gFacJobData.setLocal_Job_ID(localJobID);
gFacJobData.setService_descriptor_ID(serviceDescID);
gFacJobData.setHost_descriptor_ID(hostDescID);
gFacJobData.setJob_data(jobData);
gFacJobData.setSubmitted_time(submittedTime);
gFacJobData.setStatus_update_time(statusUpdateTime);
gFacJobData.setStatus(status);
gFacJobData.setMetadata(metadata);
if(existingGfacJobData != null){
Experiment_Data experiment_data1 = em.find(Experiment_Data.class, experimentDataResource.getExperimentID());
existingGfacJobData.setExperiment_data(experiment_data1);
existingGfacJobData.setExperiment_ID(experimentDataResource.getExperimentID());
Workflow_Data workflow_data1 = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());