Example #1
0
 public DaoResult<Bookmark> pageLinkHistory(Link link, int offset, int count)
     throws NoSuchLinkException {
   logger.debug("getHistory: link=" + link);
   GnizrDaoUtil.checkNull(link);
   Link aLink = new Link(link);
   GnizrDaoUtil.fillId(linkDao, aLink);
   return bookmarkDao.pageBookmarks(aLink, offset, count);
 }
Example #2
0
 /**
  * @deprecated Since 2.4
  * @param link
  * @return
  */
 public List<Bookmark> getHistory(Link link) {
   logger.debug("getHistory: link=" + link);
   List<Bookmark> result = new ArrayList<Bookmark>();
   GnizrDaoUtil.checkNull(link);
   Link aLink = new Link(link);
   try {
     GnizrDaoUtil.fillId(linkDao, aLink);
     int totalBmCount = bookmarkDao.getBookmarkCount(aLink);
     if (totalBmCount > 0) {
       List<Bookmark> bmarks = bookmarkDao.pageBookmarks(aLink, 0, totalBmCount).getResult();
       for (Iterator<Bookmark> it = bmarks.iterator(); it.hasNext(); ) {
         Bookmark bm = it.next();
         GnizrDaoUtil.fillObject(bookmarkDao, userDao, linkDao, bm);
         result.add(bm);
       }
     }
     return result;
   } catch (Exception e) {
     logger.debug(e);
   }
   return result;
 }