package com.jasamedika.medifirst2000.service.impl;

import java.util.List;
import java.util.Map;

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.converter.PropinsiConverter;
import com.jasamedika.medifirst2000.dao.PropinsiDao;
import com.jasamedika.medifirst2000.entities.Propinsi;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.PropinsiService;
import com.jasamedika.medifirst2000.vo.PropinsiVO;


/**
 * Implement class for PasienService
 * 
 * @author Adik
 * @param <T>
 */


@Service("propinsiService")
public class PropinsiServiceImpl  implements PropinsiService {
	
	@Autowired
	private PropinsiConverter propinsiConverter;
	
	@Autowired
	private PropinsiDao propinsiDao;

	@Override
	@Transactional(readOnly = false)
	public PropinsiVO add(PropinsiVO vo) throws JpaSystemException, ServiceVOException {
		
		Propinsi propinsi = propinsiConverter.transferVOToModel(vo, new Propinsi());
		Propinsi resultModel=propinsiDao.save(propinsi);
		PropinsiVO resultVo=new PropinsiVO();
		resultVo=propinsiConverter.transferModelToVO(resultModel, resultVo);
		return resultVo;
	}

	@Override
	public PropinsiVO update(PropinsiVO vo) throws JpaSystemException, ServiceVOException {
		return null;
	}

	@Override
	public Boolean delete(String key) throws JpaSystemException {
		return null;
	}

	@Override
	public PropinsiVO findById(String key) throws JpaSystemException {
		return null;
	}

	@Override
	public List<PropinsiVO> findAll() throws JpaSystemException {
		return null;
	}

	@Override
	public Map<String, Object> findAllWithPageAndLimitAndSortByAndDirectionParameter(Integer page, Integer limit,
			String sort, String dir) {
		return null;
	}

	


}
