public void save() throws RegistryException{
EntityManager em = null;
try {
em = ResourceUtils.getEntityManager();
em.getTransaction().begin();
QosParam qosParam = new QosParam();
Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
if (taskDetailResource != null) {
TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
qosParam.setTaskId(taskDetailResource.getTaskId());
qosParam.setTask(taskDetail);
}
qosParam.setExpId(experimentResource.getExpID());
qosParam.setExperiment(experiment);
qosParam.setStartExecutionAt(startExecutionAt);
qosParam.setExecuteBefore(executeBefore);
qosParam.setNoOfRetries(noOfRetries);
em.persist(qosParam);
qosId = qosParam.getQosId();
em.getTransaction().commit();
em.close();
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw new RegistryException(e);