Пример #1
0
 private Page<Weibo> searchLongWeibo(
     Map<String, Object> searchParams, int pageNumber, int pageSize, String sortType) {
   // TODO Auto-generated method stub
   PageRequest pageRequest = buildPageRequest(pageNumber, pageSize, sortType);
   List<Weibo> array = new ArrayList<Weibo>();
   Date fromDate = (Date) searchParams.get("date_from");
   Date toDate = (Date) searchParams.get("date_to");
   String pageProperty = pageRequest.getSort().iterator().next().getProperty();
   int total = 0;
   String word = searchParams.get("all").toString();
   total =
       longWeiboIndex.search(
           word,
           (pageNumber - 1) * pageSize,
           pageSize,
           array,
           pageProperty,
           SortOrder.DESC,
           fromDate,
           toDate);
   array = hbaseWeiboMsg.fillWeibos(array);
   Page<Weibo> resultPage = new PageImpl<Weibo>(array, pageRequest, total);
   return resultPage;
 }
Пример #2
0
 public String getLongWeiboText(String mid) {
   // TODO Auto-generated method stub
   return longWeiboIndex.getLongWeiboText(mid);
 }