Examples of Entries


Examples of com.jdkcn.myblog.web.page.admin.Entries

    PaginationSupport<Entry> ps = new PaginationSupport<Entry>(list, list.size());
    expect(entryServiceMock.search(EasyMock.anyObject(Condition.class), EasyMock.capture(captureRange), EasyMock.anyObject(Sorter.class))).andReturn(ps)
        .once();

    Entries entries = new Entries(entryServiceMock);

    replay(entryServiceMock);

    entries.get();

    Assert.assertEquals(1, entries.getEntries().size());
    Assert.assertEquals(Constants.DEFAULT_PAGE_SIZE, captureRange.getValue().getSize());
    verify(entryServiceMock);

  }
View Full Code Here

Examples of com.jdkcn.myblog.web.page.admin.Entries

   
    PaginationSupport<Entry> ps = new PaginationSupport<Entry>(list, list.size());
    expect(entryServiceMock.search(EasyMock.anyObject(Condition.class), EasyMock.capture(captureRange), EasyMock.anyObject(Sorter.class))).andReturn(ps)
    .once();
   
    Entries entries = new Entries(entryServiceMock);
    entries.setP(2);
    entries.setSize(5);
   
    replay(entryServiceMock);
   
    entries.get();
   
    Assert.assertEquals(1, entries.getEntries().size());
    Assert.assertEquals(5, captureRange.getValue().getSize());
    Assert.assertEquals(5, captureRange.getValue().getStart());
    Assert.assertEquals(10, captureRange.getValue().getEnd());
    verify(entryServiceMock);
   
View Full Code Here

Examples of org.domain.model.component.entry.Entries

      ModelContext blogEntriesModelContext = new ModelContext();
      blogEntriesModelContext.setDomainModel(app.getDomainModel());

      Users users = (Users) app.getEntry("Users");
      Blogs allApprovedBlogs = users.getAllApprovedBlogs();
      Entries allApprovedEntries = allApprovedBlogs
          .getAllApprovedEntries();
      if (allApprovedEntries != null) {
        Entries selectedEntries = allApprovedEntries.getLastEntries(3);
        blogEntriesModelContext.setEntities(selectedEntries);
      } else {
        blogEntriesModelContext.setEntities(allApprovedEntries);
      }
      ViewContext blogEntriesViewContext = new ViewContext();
View Full Code Here

Examples of org.domain.model.component.entry.Entries

  private Entries entries;

  public Blog(IDomainModel domainModel) {
    super(domainModel);
    // internal child neighbors only
    entries = new Entries(this);
  }
View Full Code Here

Examples of org.domain.model.component.entry.Entries

    }
    return allApprovedBlogs;
  }

  public Entries getAllApprovedEntries() {
    Entries allApprovedEntries = null;
    try {
      Blog blog;
      for (Iterator x = iterator(); x.hasNext();) {
        blog = (Blog) x.next();
        Entries blogApprovedEntries = blog.getEntries()
            .getApprovedEntries();
        if (allApprovedEntries == null) {
          SelectionCriteria all = SelectionCriteria
              .defineAllCriteria();
          allApprovedEntries = (Entries) blogApprovedEntries
              .getEntities(all);
          allApprovedEntries.setPropagateToSource(false);
        } else {
          Entry entry;
          for (Iterator y = blogApprovedEntries.iterator(); y
              .hasNext();) {
            entry = (Entry) y.next();
            allApprovedEntries.add(entry);
          }
        }
View Full Code Here

Examples of org.domain.model.component.entry.Entries

    }
    return order;
  }

  public Entries getAllApprovedEntries() {
    Entries allApprovedEntries = null;
    try {
      Blog blog;
      for (Iterator x = iterator(); x.hasNext();) {
        blog = (Blog) x.next();
        Entries blogApprovedEntries = blog.getEntries()
            .getApprovedEntries();
        if (allApprovedEntries == null) {
          SelectionCriteria all = SelectionCriteria
              .defineAllCriteria();
          allApprovedEntries = (Entries) blogApprovedEntries
              .getEntities(all);
          allApprovedEntries.setPropagateToSource(false);
        } else {
          Entry entry;
          for (Iterator y = blogApprovedEntries.iterator(); y
              .hasNext();) {
            entry = (Entry) y.next();
            allApprovedEntries.add(entry);
          }
        }
View Full Code Here

Examples of org.domain.model.component.entry.Entries

  }

  private void test05() {
    Users users = getUsers();
    Blogs allApprovedBlogs = users.getAllApprovedBlogs();
    Entries allApprovedEntries = allApprovedBlogs.getAllApprovedEntries();
    Entries selectedEntries = allApprovedEntries.getLastEntries(3);
    selectedEntries.output("The Last Three Approved Blog Entries");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.