Package com.gnizr.db.dao.bookmark

Examples of com.gnizr.db.dao.bookmark.BookmarkDBDao


 
  public void testExpandTag() throws Exception{
    List<FolderTag> folderTags = null;
    FolderTag t1, t2, t3;
   
    BookmarkDao bmarkDao = new BookmarkDBDao(getDataSource());
    Bookmark bm = bmarkDao.getBookmark(1);
    List<String> tags = bm.getTagList();
    assertTrue(tags.contains("cnn"));
    assertTrue(tags.contains("news"));
   
    Tag cnnTag = tagDao.getTag(1);
View Full Code Here


    // Test fresh creation
    UserDBDao userDao = new UserDBDao(getDataSource());
    User user = userDao.getUser((1));
    assertNotNull(user);
   
    BookmarkDBDao bmDao = new BookmarkDBDao(getDataSource());
   
    Bookmark bookmark = bmDao.getBookmark(301);
    assertNotNull(bookmark);
   
    ForUser forUser = new ForUser (user, bookmark, "This is just a test", new Date());
   
    int fuid = fuDao.createForUser(forUser);
View Full Code Here

  {
    UserDBDao userDao = new UserDBDao(getDataSource());
    User user = userDao.getUser((2));
    assertNotNull(user);
   
    BookmarkDBDao bmDao = new BookmarkDBDao(getDataSource());
    Bookmark bookmark = bmDao.getBookmark(301);
    assertNotNull(bookmark);
   
    assertTrue (fuDao.hasForUser(bookmark, user));
  }
View Full Code Here

    assertTrue (fuDao.hasForUser(bookmark, user));
  }
 
  public void testFindForUserFromBookmark ()
  {
    BookmarkDBDao bmDao = new BookmarkDBDao(getDataSource());
    Bookmark bookmark = bmDao.getBookmark(301);
    assertNotNull(bookmark);
   
    List<ForUser> linksForUsers = fuDao.findForUserFromBookmark(bookmark);
   
    assertTrue(linksForUsers.size()==1);
View Full Code Here

   * @return an object this class
   */
  public static final GnizrDao getInstance(DataSource datasource){
    if(gnizrDao == null){
      gnizrDao = new GnizrDao();
      gnizrDao.setBookmarkDao(new BookmarkDBDao(datasource));
      gnizrDao.setUserDao(new UserDBDao(datasource));
      gnizrDao.setLinkDao(new LinkDBDao(datasource));
      gnizrDao.setTagDao(new TagDBDao(datasource));
      gnizrDao.setFeedSubscriptionDao(new FeedSubscriptionDBDao(datasource));
      gnizrDao.setForUserDao(new ForUserDBDao(datasource));
View Full Code Here

      dataSource.setUrl("jdbc:mysql://localhost/gnizr_test");
      dataSource.setDriverClassName("com.mysql.jdbc.Driver");
    }
   
    gnizrDBDao = new GnizrDao();
    gnizrDBDao.setBookmarkDao(new BookmarkDBDao(dataSource));
    gnizrDBDao.setUserDao(new UserDBDao(dataSource));
    gnizrDBDao.setLinkDao(new LinkDBDao(dataSource));
    gnizrDBDao.setTagDao(new TagDBDao(dataSource));
    gnizrDBDao.setTagPropertyDao(new TagPropertyDBDao(dataSource));
    gnizrDBDao.setTagAssertionDao(new TagAssertionDBDao(dataSource));
View Full Code Here

TOP

Related Classes of com.gnizr.db.dao.bookmark.BookmarkDBDao

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.