package com.jasamedika.medifirst2000.service.impl;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.jpa.JpaSystemException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


	

import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.JurusanPeminatanService;
import com.jasamedika.medifirst2000.util.CommonUtil;
import com.jasamedika.medifirst2000.entities.JurusanPeminatan;
import com.jasamedika.medifirst2000.vo.JurusanPeminatanVO;
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.dao.JurusanPeminatanDao;

/**
 * Implement class for JurusanPeminatanService
 * 
 * @author Generator
 * @param <T>
 */
@Service("jurusanPeminatanService")
public class JurusanPeminatanServiceImpl extends BaseVoServiceImpl implements JurusanPeminatanService 
{	
	@Autowired
	private BaseConverterImpl<JurusanPeminatanVO,JurusanPeminatan>jurusanPeminatanConverter;
	
	@Autowired
	private JurusanPeminatanDao jurusanPeminatanDao;

	
	@Override
	public Map<String, Object> saveJurusanPeminatan(JurusanPeminatanVO vo) {
		Map<String, Object> result = new HashMap<String, Object>();
		JurusanPeminatan model = new JurusanPeminatan();
		model = jurusanPeminatanConverter.transferVOToModel(vo,model);
		

		JurusanPeminatan resultDomain = jurusanPeminatanDao.save(model);
		if (CommonUtil.isNotNullOrEmpty(resultDomain)) {
			result.put("noRec", resultDomain.getNoRec());
		}

		return result;
	}
}