package com.jasamedika.medifirst2000.service.impl;

import java.util.ArrayList;
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 com.jasamedika.medifirst2000.converter.SWOTConverter;
import com.jasamedika.medifirst2000.dao.SWOTDao;
import com.jasamedika.medifirst2000.entities.SWOT;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.SWOTService;
import com.jasamedika.medifirst2000.vo.SWOTVO;

@Service("SWOTService")
public class SWOTServiceImpl extends BaseVoServiceImpl implements SWOTService {

	@Autowired
	private SWOTDao swotDao;

	@Autowired
	private SWOTConverter swotConverter;
	
	@Override
	public SWOTVO add(SWOTVO vo) throws JpaSystemException, ServiceVOException {
		return null;
	}

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

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

	@Override
	public SWOTVO findById(Integer key) throws JpaSystemException {
		return null;
	}

	@Override
	public List<SWOTVO> findAll() throws JpaSystemException {
		List<SWOTVO> vos = new ArrayList<SWOTVO>();
		List<SWOT> models = (List<SWOT>) swotDao.findAll();		
		swotConverter.transferListOfModelToListOfVO(models, vos);
		return vos;
	}

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

}
