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.KelompokShiftService;
import com.jasamedika.medifirst2000.util.CommonUtil;
import com.jasamedika.medifirst2000.entities.KelompokShift;
import com.jasamedika.medifirst2000.vo.KelompokShiftVO;
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.dao.KelompokShiftDao;

/**
 * Implement class for KelompokShiftService
 * 
 * @author Generator
 * @param <T>
 */
@Service("kelompokShiftService")
public class KelompokShiftServiceImpl extends BaseVoServiceImpl implements KelompokShiftService 
{	
	@Autowired
	private BaseConverterImpl<KelompokShiftVO,KelompokShift>kelompokShiftConverter;
	
	@Autowired
	private KelompokShiftDao kelompokShiftDao;

	
	
	@Override
	public Map<String, Object> saveKelompokShift(KelompokShiftVO vo) {
		Map<String, Object> result = new HashMap<String, Object>();
		KelompokShift model = new KelompokShift();
		model = kelompokShiftConverter.transferVOToModel(vo,model);
		

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

		return result;
	}
}