示例#1
0
 public void showRequestList(RequestVO request) throws SeeWorldException {
   String reciever_id = request.getReciever_id();
   User reciever = userDao.findById(reciever_id);
   List<Request> list =
       requestDao.findByProperty(
           "from Request as model where model.reciever=? order by model.addTime desc", reciever);
   requestSum = list.size();
   if (requestSum > 0) {
     requestList = new JSONArray();
     requestList.addAll(vOPOTransformator.transferRequestToVOList(list));
   }
 }
示例#2
0
 public void gotoPage(RequestVO request, Integer requestSum, Integer currentPage)
     throws SeeWorldException {
   String reciever_id = request.getReciever_id();
   Pagination pager = new Pagination();
   pager.setLen(requestSum);
   pager.setPagesize(settingLogic.getIntConfigValue(Constant.REQUESTS_PER_PAGE));
   pager.setCurrentpage(currentPage);
   pager.setPagelist();
   String hql =
       "from Request as model where model.reciever='"
           + reciever_id
           + "' order by model.addTime desc";
   List<Request> allRequest = requestDao.getListByPage(hql, pager.getStart(), pager.getPagesize());
   requestList = new JSONArray();
   requestList.addAll(vOPOTransformator.transferRequestToVOList(allRequest));
   PageJson = JSONObject.fromObject(pager);
 }