コード例 #1
0
 @Override
 public Long saveOrUpdateHX_user(HX_user hx_user, String userId, String nickName) {
   HX_userPO hx_userPO = new HX_userPO();
   if (hx_user != null) {
     hx_userPO.setHx_password(hx_user.getPassword());
     hx_userPO.setHx_username(hx_user.getUsername());
     hx_userPO.setNickname(nickName);
     hx_userPO.setUserId(Long.valueOf(userId));
   }
   return hX_userDao.createHX_user(hx_userPO);
 }
コード例 #2
0
 @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;
 }
コード例 #3
0
 @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;
 }
コード例 #4
0
 @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;
 }
コード例 #5
0
 @Override
 public void updateHX_user(HX_user hx_user) {
   HX_userPO hx_userPO = new HX_userPO();
   if (hx_user != null) {
     hx_userPO.setHx_password(hx_user.getPassword());
     hx_userPO.setHx_username(hx_user.getUsername());
     hx_userPO.setNickname(hx_user.getNickName());
     hx_userPO.setUserId(Long.valueOf(hx_user.getUserId()));
     hx_userPO.setId(hx_user.getId());
   }
   hX_userDao.updateHX_user(hx_userPO);
 }