package com.palmnest.service.estateserve.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.palmnest.dao.estateserve.VirtUserDao;
import com.palmnest.model.VirtUserInfo;
import com.palmnest.service.estateserve.VirtUserManager;
import com.palmnest.service.impl.GenericManagerImpl;

@Service("virtUserManager")
public class VirtUserManagerImpl extends GenericManagerImpl<VirtUserInfo, Integer> implements VirtUserManager {

	private VirtUserDao virtUserDao;

	@Autowired
	public void setVirtUserDao(VirtUserDao virtUserDao) {
		this.virtUserDao = virtUserDao;
		this.dao = virtUserDao;
	}

	@Override
	public String delVirtUserByVirtId(int virtId) throws Exception {
		return virtUserDao.delVirtUserByVirtId(virtId);
	}

	@Override
	public List<VirtUserInfo> getVirtUserByVirtId(int virtId) throws Exception {
		return virtUserDao.getVirUserByVirId(virtId);
	}

	@Override
	public List<VirtUserInfo> getVirIdByUserId(int userId) throws Exception {
		return virtUserDao.getVirIdByUserId(userId);
	}

}
