package be.un.odp.services.implementations;

import be.un.odp.dao.PortalTypeDao;
import be.un.odp.models.PortalType;
import be.un.odp.services.PortalTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * Created on 13-03-17.
 *
 * @author Nokorbis
 * @version 1.0.0
 * @since 1.0.0
 */
@Service("portalTypeService")
public class PortalTypeServiceImpl implements PortalTypeService {

    @Autowired
    private PortalTypeDao portalTypeDao;


    @Override
    public List<PortalType> findAllPortalTypes () {
        return portalTypeDao.findAllPortalTypes();
    }


    @Override
    public PortalType findPortalType (int id) {
        return portalTypeDao.findPortalType(id);
    }


    @Override
    public PortalType findPortalTypeById (int id) {
        return portalTypeDao.findPortalTypeById(id);
    }


    @Override
    public PortalType findPortalTypeByName (String name) {
        return portalTypeDao.findPortalTypeByName(name);
    }


    @Override
    public void updatePortalType (PortalType type) {
        portalTypeDao.updatePortalType(type);
    }


    @Override
    public void createPortalType (PortalType type) {
        portalTypeDao.createPortalType(type);
    }


    @Override
    public void deletePortalType (PortalType type) {
        portalTypeDao.deletePortalType(type);
    }


    @Override
    public void deletePortalTypeById (int id) {
        portalTypeDao.deletePortalTypeById(id);
    }
}
