package co.nook.app.user.service;

import co.nook.app.user.dao.UserDao;
import co.nook.app.user.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Connection;
import java.util.ArrayList;

@Service("userService")
public class UserServiceImpl implements UserService{

	UserDao userDao;

	@Autowired
	public UserServiceImpl(UserDao userDao){
		this.userDao = userDao;
	}


	@Override
	public ArrayList<UserVo> allSelect(){
		return userDao.allSelect();
	}

	@Override
	public UserVo select( String id){
		return userDao.select( id);
	}

	@Override
	public UserVo select( int userNo){
		return userDao.select( userNo);
	}

	@Override
	public int insert( UserVo vo){
		return userDao.insert( vo);
	}

	@Override
	public int update( UserVo vo){
		return userDao.update( vo);
	}

	@Override
	public int delete( UserVo vo){
		return userDao.delete( vo);
	}
}
