Package org.timedex.beans

Examples of org.timedex.beans.Page


        .list();
      return result;
  }

  public Page findById(long pageId) {
      Page result = (Page)getCurrentSession().createCriteria(Page.class)
        .add(Restrictions.eq("id", pageId)).uniqueResult();
      return result;
  }
View Full Code Here


        .add(Restrictions.eq("id", pageId)).uniqueResult();
      return result;
  }

  public Page findByTitleAndNamespace(String title, int namespace) {
      Page result = (Page)getCurrentSession()
        .createCriteria(Page.class)
        .add(Restrictions.eq("title", title))
        .add(Restrictions.eq("namespace", namespace))
        .uniqueResult();
      return result;
View Full Code Here

     
      for (PageLink pl : chunk) {
        try {
          sessionStrategy.beginTransaction();
         
          Page found = pageDAO.findById(pl.getSourcePageId());
         
          if (found == null) {
            pageLinkDAO.delete(pl);
            erased++;
          } else {
            Page found2 = pageDAO.findByTitleAndNamespace(pl.getDestinationTitle(), pl.getDestinationNamespace());
         
            if (found2 == null) {
              pageLinkDAO.delete(pl);
              erased++;
            }
View Full Code Here

 
  //test
  public static void main(String[] args) {
    PageDAO pageDAO = new PageDAOImpl();
    PageTextDAO pageTextDAO = new PageTextDAOImpl();
    Page page = pageDAO.findById(927);
    PageText ptext = pageTextDAO.findByPage(page);
    String text = ptext.getTextAsString();
    WikitextStripper stripper = new WikitextStripper();
    //stripper.setLeaveHeadings(true);
    System.out.println(text);
View Full Code Here

TOP

Related Classes of org.timedex.beans.Page

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.