Package org.domain.model.component.entry

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


  private Entries entries;

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

    }
    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

    }
    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

  }

  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

Related Classes of org.domain.model.component.entry.Entries

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.