Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.ICategory


      IPerson author = fFactory.createPerson(null, news3);
      author.setName("Benjamin Pasero");

      /* Category */
      INews news4 = createNews(feed, "McDonalds", "http://www.news.com/news4.html", State.NEW);
      ICategory category = fFactory.createCategory(null, news4);
      category.setName("Benjamin Pasero");

      /* Attachment Content */
      INews news5 = createNews(feed, "McFlurry", "http://www.news.com/news5.html", State.NEW);
      IAttachment attachment = fFactory.createAttachment(null, news5);
      attachment.setLink(new URI("http://www.attachment.com/att1news2.file"));
View Full Code Here


      IPerson author = fFactory.createPerson(null, news3);
      author.setName("Arnold Schwarzenegger");

      /* Category */
      INews news4 = createNews(feed, "News4", "http://www.news.com/news4.html", State.NEW);
      ICategory category = fFactory.createCategory(null, news4);
      category.setName("Roberts");

      /* Attachment Content */
      INews news5 = createNews(feed, "News5", "http://www.news.com/news5.html", State.NEW);
      IAttachment attachment = fFactory.createAttachment(null, news5);
      attachment.setLink(new URI("http://www.attachment.com/att1news2.file"));
View Full Code Here

      IPerson author = fFactory.createPerson(null, news3);
      author.setName("Arnold Schwarzenegger");

      /* Category */
      INews news4 = createNews(feed, "News4", "http://www.news.com/news4.html", State.NEW);
      ICategory category = fFactory.createCategory(null, news4);
      category.setName("Roberts");

      /* Attachment Content */
      INews news5 = createNews(feed, "News5", "http://www.news.com/news5.html", State.NEW);
      IAttachment attachment = fFactory.createAttachment(null, news5);
      attachment.setLink(new URI("http://www.attachment.com/att1news2.file"));
View Full Code Here

      IPerson author = fFactory.createPerson(null, news3);
      author.setName("Arnold Schwarzenegger");

      /* Category */
      INews news4 = createNews(feed, "News4", "http://www.news.com/news4.html", State.NEW);
      ICategory category = fFactory.createCategory(null, news4);
      category.setName("Roberts");

      /* Attachment Content */
      INews news5 = createNews(feed, "News5", "http://www.news.com/news5.html", State.NEW);
      IAttachment attachment = fFactory.createAttachment(null, news5);
      attachment.setLink(new URI("http://www.attachment.com/att1news2.file"));
View Full Code Here

  @Test
  public void testLoadAllCategoryNames() throws Exception {
    IFeed feed = fFactory.createFeed(null, new URI("feed"));
    feed = DynamicDAO.save(feed);

    ICategory cat1 = fFactory.createCategory(null, feed);
    cat1.setName("foo");

    ICategory cat2 = fFactory.createCategory(null, feed);
    cat2.setName("bar");

    DynamicDAO.save(feed);
    DynamicDAO.save(cat1);
    DynamicDAO.save(cat2);

    Set<String> cats = DynamicDAO.getDAO(ICategoryDAO.class).loadAllNames();
    assertEquals(2, cats.size());
    assertTrue(cats.contains(cat1.getName()));
    assertTrue(cats.contains(cat2.getName()));
  }
View Full Code Here

    assertNull(fDb.ext().getByID(searchFieldId));
  }

  private ICategory createFeedCategory() throws PersistenceException {
    IFeed feed = DynamicDAO.save(createFeed());
    ICategory category = fTypesFactory.createCategory(null, feed);
    category.setName("categoryName");
    category.setDomain("some/domain");
    category.setProperty("one_property", "value");
    return category;
  }
View Full Code Here

  }

  private ICategory createNewsCategory() throws PersistenceException {
    IFeed feed = DynamicDAO.save(createFeed());
    INews news = DynamicDAO.save(createNews(feed));
    ICategory category = fTypesFactory.createCategory(null, news);
    category.setName("categoryName");
    category.setDomain("some/domain");
    category.setProperty("one_property", "value");
    return category;
  }
View Full Code Here

   * exception is thrown.
   */
  @Test
  public void testAddAndDeleteFeedCategory() {
    try {
      ICategory category = createFeedCategory();
      ICategory savedCategory = DynamicDAO.save(category);
      DynamicDAO.delete(savedCategory);
    } catch (PersistenceException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

   * exception is thrown.
   */
  @Test
  public void testAddAndDeleteNewsCategory() {
    try {
      ICategory category = createNewsCategory();
      ICategory savedCategory = DynamicDAO.save(category);
      DynamicDAO.delete(savedCategory);
    } catch (PersistenceException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

  private INews createNews(IFeed feed) {
    INews news = fTypesFactory.createNews(null, feed, createDate());
    IAttachment attachment = fTypesFactory.createAttachment(null, news);
    attachment.setLink(createURI("http://attachmenturi.com"));
    ICategory category = fTypesFactory.createCategory(null, news);
    category.setName("Category name #1");
    news.setAuthor(createPersonMary(news));
    news.setBase(createURI("http://www.someuri.com"));
    news.setComments("One comment");
    news.setState(State.DELETED);
    news.setDescription("News description");
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.ICategory

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.