Package com.gnizr.db.dao

Examples of com.gnizr.db.dao.Link


    Date createdOn = createDateCreatedOn(entry, fromFeed, fromSubscription);
    Date lastUpdated = createDateLastUpdated(entry, fromFeed, fromSubscription);
    List<String> tags = createTags(entry, fromFeed, fromSubscription);
    List<MachineTag> machineTags = createMachineTags(entry, fromFeed, fromSubscription);
    User user = createUser(entry, fromFeed, fromSubscription);
    Link link = createLink(entry, fromFeed, fromSubscription);
    List<PointMarker> pm = createPointMarkers(entry, fromFeed, fromSubscription);

    BookmarkEntry newBmEntry = null;
    if(title != null && user != null && link != null){
      Bookmark bm = new Bookmark(user,link);
View Full Code Here


  }
 
  protected Link createLink(SyndEntry entry, SyndFeed fromFeed, FeedSubscription fromSubscription){
    String linkUrl = entry.getLink();
    if(linkUrl != null){
      return new Link(entry.getLink());
    }else{
      logger.debug("SyndEntry getLink() returns null. Entry: " + entry);
    }
    return null;
  }
View Full Code Here

    assertNotNull(b);
    assertEquals("Spring Framework: Inversion of Control (IoC)",b.getTitle());
  }
 
  public void testPageLinkHistory() throws Exception{
    DaoResult<Bookmark> result = linkManager.pageLinkHistory(new Link(209), 0, 10);
    assertEquals(2,result.getSize());
    assertEquals(2,result.getResult().size());
   
    result = linkManager.pageLinkHistory(new Link(209), 1, 10);
    assertEquals(2,result.getSize());
    assertEquals(1,result.getResult().size());
  }
View Full Code Here

    bookmarkDao = getGnizrDao().getBookmarkDao();
  }

  public void testFillIdBookmark() throws Exception{
    User user = new User(1);
    Link link = new Link("http://zirr.us/");
    Bookmark bmark = new Bookmark(user,link);
    GnizrDaoUtil.fillId(bookmarkDao, userDao, linkDao, bmark);
    assertEquals((300),bmark.getId());
    assertEquals((1),bmark.getUser().getId());
    assertEquals((202),bmark.getLink().getId());
View Full Code Here

    assertEquals((1),bmark.getUser().getId());
    assertEquals((202),bmark.getLink().getId());
  }
 
  public void testFillIdLink() throws Exception{
    Link link = new Link("http://zirr.us/");
    GnizrDaoUtil.fillId(linkDao, link);
    assertEquals((202),link.getId());
  }
View Full Code Here

    assertEquals((202),link.getId());
  }
 
  public void testFillIdLinkTag() throws Exception{
    Tag tag = new Tag("web");
    Link link = new Link(202);
    LinkTag linkTag = new LinkTag(link,tag);
    GnizrDaoUtil.fillId(tagDao,linkDao,linkTag);
    assertEquals((1),linkTag.getId());
    assertEquals((3),linkTag.getTag().getId());
    assertEquals((202),linkTag.getLink().getId());   
View Full Code Here

    assertEquals("hchen1",bm.getUser().getUsername());
    assertEquals("http://zirr.us/",bm.getLink().getUrl());
  }
 
  public void testFillObjectLink() throws Exception{
    Link link = new Link(202);
    GnizrDaoUtil.fillObject(linkDao,link);
    assertEquals(1003,link.getMimeTypeId());
    assertEquals("http://zirr.us/",link.getUrl());
    assertEquals(1,link.getCount());
  }
View Full Code Here

  }
 
  public void testAddBookmark() throws Exception{
    Bookmark bm = new Bookmark();
    bm.setUser(new User(3));
    bm.setLink(new Link("http://www.google.com"));
    bm.setTitle("google");
   
    int id = manager.addBookmark(bm);
    assertTrue(id > 0);
   
View Full Code Here

    cnt = forUserManager.getForUserCount(new User(3));
    assertEquals(0,cnt);
   
    Bookmark b = new Bookmark();
    b.setTitle("example site");
    b.setLink(new Link("http://example.org/foobar"));
    b.setTags("abc 123 for:jsmith for:hchen1");
    b.setUser(new User(1));
   
    int id = bookmarkManager.addBookmark(b);
    assertTrue((id > 0));
View Full Code Here

    cnt = forUserManager.getForUserCount(new User(3));
    assertEquals(0,cnt);
   
    Bookmark b = new Bookmark();
    b.setTitle("example site");
    b.setLink(new Link("http://example.org/foobar"));
    b.setTags("abc 123 for:jsmith for:hchen1");
    b.setUser(new User(1));
   
    int id = bookmarkManager.addBookmark(b);
   
View Full Code Here

TOP

Related Classes of com.gnizr.db.dao.Link

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.