public void save() throws RegistryException{
EntityManager em = null;
try {
em = ResourceUtils.getEntityManager();
DataTransferDetail existingDF = em.find(DataTransferDetail.class, transferId);
em.close();
em = ResourceUtils.getEntityManager();
em.getTransaction().begin();
DataTransferDetail dataTransferDetail = new DataTransferDetail();
TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
dataTransferDetail.setTransferId(transferId);
dataTransferDetail.setTask(taskDetail);
dataTransferDetail.setTaskId(taskDetailResource.getTaskId());
dataTransferDetail.setCreationTime(creationTime);
if (transferDescription != null) {
dataTransferDetail.setTransferDesc(transferDescription.toCharArray());
}
if (existingDF != null) {
existingDF.setTransferId(transferId);
existingDF.setTask(taskDetail);
existingDF.setTaskId(taskDetailResource.getTaskId());