Package org.timedex.beans

Examples of org.timedex.beans.Page


  public void setUpInternal() {
    pageDAO = new PageDAOImpl();
  }
 
  public void testFindByIdNotFound() {
    Page found = pageDAO.findById(-1);
   
    assertNull(found);
  }
View Full Code Here


   
    assertNull(found);
  }
 
  public void testFindByIdFound() {
    Page found = pageDAO.findById(8942008);
   
    assertNotNull(found);
    assertEquals(found.getTitle(), "High_school_sports_conferences_and_leagues_in_the_United_States");
    assertEquals(found.getTouched(), "20070406043310");
  }
View Full Code Here

    assertNotNull(found);
    assertTrue(found.size() > 0);
  }
 
  public void testFindByTitleAndNamespaceNotFound() {
    Page found = pageDAO.findByTitleAndNamespace("High_school_sports_conferences_and_leagues_in_the_United_States", 14);
    Page found2 = pageDAO.findByTitleAndNamespace("THISDOESNOTEXIST", 0);
   
    assertNotNull(found);
    assertNull(found2);
  }
View Full Code Here

    assertNotNull(found);
    assertNull(found2);
  }
 
  public void testFindByTitleAndNamespaceFound() {
    Page found = pageDAO.findByTitleAndNamespace("High_school_sports_conferences_and_leagues_in_the_United_States", 14);
   
    assertNotNull(found);
    assertEquals(found.getId(), 8942008);
  }
View Full Code Here

   
    assertNull(found);
  }
 
  public void testFindCreateUpdateDelete() {
    Page page = pageDAO.findById(8942008);
   
    Event newEvent = new Event(page, "blah blah September 7, 1985 blah", new Date(), new Date(), null, -1);//TODO
   
    eventDAO.create(newEvent);
   
View Full Code Here

    pageDAO = new PageDAOImpl();
    pageLinkDAO = new PageLinkDAOImpl();
  }
 
  public void testFindLinksOutByPageFound() {
    Page page = pageDAO.findById(654713);
    List<Page> links = pageLinkDAO.findLinksOutByPage(page);
   
    assertNotNull(links.get(0));
    assertEquals("The_Spitfire_Grill", links.get(0).getTitle());
  }
View Full Code Here

    assertNotNull(links.get(0));
    assertEquals("The_Spitfire_Grill", links.get(0).getTitle());
  }
 
  public void testFindLinksInByPageFound() {
    Page page = pageDAO.findByTitleAndNamespace("The_Spitfire_Grill", 0);
    List<Page> links = pageLinkDAO.findLinksInByPage(page);
   
    assertEquals(1, links.size());
  }
View Full Code Here

    pageDAO = new PageDAOImpl();
    pageTextDAO = new PageTextDAOImpl();
  }
 
  public void testFindByPageFound() {
    Page page = pageDAO.findById(3123636);
    PageText text = pageTextDAO.findByPage(page);
   
    assertNotNull(text);
    assertNotNull(text.getText());
  }
View Full Code Here

    .add(Restrictions.eq("sourcePageId", page.getId()))
    .list();

    List<Page> pages = new ArrayList<Page>(result.size());
    for(PageLink pl : result) {
      Page found = (Page)pageC
      .add(Restrictions.eq("title", pl.getDestinationTitle()))
      .add(Restrictions.eq("namespace", pl.getDestinationNamespace()))
      .uniqueResult();

      if (found != null)
View Full Code Here

    .add(Restrictions.eq("destinationTitle", page.getTitle()))
    .list();

    List<Page> pages = new ArrayList<Page>(result.size());
    for(PageLink pl: result) {
      Page found = (Page)pageC
      .add(Restrictions.eq("id", pl.getSourcePageId()))
      .uniqueResult();

      if (found != null)
        pages.add(found);
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.