public List<UserVo> nameSearch(int page, String name) { List<UserVo> list = userDao.nameSearch(name); int total = list.size(); int p = (page - 1) * 20; // start int end = p + 20; // end List<UserVo> list1 = new ArrayList<UserVo>(); for (int i = p; i < end; i++) { if (i == total) { break; } else { list1.add(list.get(i)); } } return list1; }
public List<UserVo> nameMembers(String name) { List<UserVo> list = userDao.nameSearch(name); return list; }
public List<UserVo> idMembers(String id) { List<UserVo> list = userDao.idSearch(id); return list; }
public List<UserVo> getMembers() { List<UserVo> list = userDao.getMember(); return list; }
public void modify(UserVo vo) { userDao.update(vo); }
public UserVo login(String id, String password) { UserVo vo = userDao.getLogin(id, password); return vo; }
public void join(UserVo vo) { userDao.insert(vo); }