示例#1
0
  @Override
  public void addUser(User user) {
    // 业务逻辑代码

    // dao
    userDao.save(user);
  }
示例#2
0
 @Override
 public User login(String loginName, String password) {
   // TODO Auto-generated method stub
   String[] propNames = new String[] {"loginName", "password"};
   String[] propValues = new String[] {loginName, Md5Util.getMD5(password)};
   return (User) userDao.findObjectByPars(User.class, propNames, propValues);
 }
示例#3
0
 @Override
 public QueryResult<User> getScrollData(
     int firstResult,
     int maxresult,
     String wherehql,
     Object[] queryParams,
     LinkedHashMap<String, String> orderby) {
   return userDao.getScrollData(firstResult, maxresult, wherehql, queryParams, orderby);
 }
示例#4
0
 @Override
 public List findAll() {
   return userDao.findAll();
 }
示例#5
0
 @Override
 public void updateUser(User user) {
   // TODO Auto-generated method stub
   userDao.update(user);
 }
示例#6
0
 @Override
 public User getUserById(int id) {
   // TODO Auto-generated method stub
   return userDao.getEntityById(id);
 }
示例#7
0
 @Override
 public void delete(User user) {
   userDao.delete(user);
 }
示例#8
0
 @Override
 public void deleteAll(List idList) {
   userDao.deleteAll("id", idList);
 }
示例#9
0
 @Override
 public long getCount() {
   // TODO Auto-generated method stub
   return userDao.getCount();
 }