@Override public HX_user getHXuserByNickName(String name) { HX_user hx_user = new HX_user(); HX_userPO hx_userPO = hX_userDao.findHx_userByNickName(name); if (hx_userPO != null) { hx_user.setPassword(hx_userPO.getHx_password()); hx_user.setUsername(hx_userPO.getHx_username()); hx_user.setUserId(String.valueOf(hx_userPO.getUserId())); hx_user.setNickName(hx_userPO.getNickname()); } return hx_user; }
@Override public HX_user getHX_user(Long id) { HX_user hx_user = new HX_user(); HX_userPO hx_userPO = hX_userDao.findHx_userByUserPOId(String.valueOf(id)); if (hx_userPO != null) { hx_user.setPassword(hx_userPO.getHx_password()); hx_user.setUsername(hx_userPO.getHx_username()); hx_user.setUserId(String.valueOf(hx_userPO.getUserId())); hx_user.setId(hx_userPO.getId()); } return hx_user; }
@Override public List<HX_user> findHX_userByUsernames(List<String> usernames) { List<HX_user> hx_users = new ArrayList<HX_user>(); List<HX_userPO> hx_userPOs = hX_userDao.findHx_userByUserPONames(usernames); if (hx_userPOs != null && !hx_userPOs.isEmpty()) { HX_user hx_user = new HX_user(); for (HX_userPO hUserPO : hx_userPOs) { hx_user.setNickName(hUserPO.getNickname()); hx_user.setUserId(String.valueOf(hUserPO.getUserId())); hx_users.add(hx_user); } } return hx_users; }