Package org.dmlite.model.component.comment

Examples of org.dmlite.model.component.comment.Comments


    try {
      App app = (App) getApplication();

      ModelContext commentsModelContext = new ModelContext();
      commentsModelContext.setDomainModel(app.getDomainModel());
      Comments comments = (Comments) app.getEntry("Comments");
      commentsModelContext.setEntities(comments);

      ViewContext commentsViewContext = new ViewContext();
      commentsViewContext.setApp(app);
View Full Code Here


      OutTester.output(errors, "Users Add Errors");
    }
  }

  private void createTestComments() {
    Comments comments = getComments();
    // comments.createComment("This is some magic!");
    // comments.createComment("What is the magic?");
    // comments.createComment("I am not sure what this is?");
    // comments.createComment("Oooooohhh");
    comments.createComment("Aaaaaohhh");
    List errors = comments.getErrors().getErrorList();
    if (errors.size() > 0) {
      OutTester.output(errors, "Comments Add Errors");
    }
  }
View Full Code Here

    Categories categories = getCategories();
    categories.output("Categories");
  }

  private void outputComments() {
    Comments comments = getComments();
    comments.output("Comments");
  }
View Full Code Here

    selectedEntries.output("The Last Three Approved Blog Entries");
  }

  private void test06() {
    try {
      Comments comments = getComments();
      Comments javaComments = comments.getKeywordComments("Java");
      Comments relationshipsComments = comments
          .getKeywordComments("relationships");
      Comments union = (Comments) javaComments
          .union(relationshipsComments);
      union.output("Union Comments");
    } catch (SelectionException se) {
      log.info("Union problem: " + se.getMessage());
    }
  }
View Full Code Here

    }
  }

  private void test07() {
    try {
      Comments comments = getComments();
      Comments javaComments = comments.getKeywordComments("Java");
      Comments relationshipsComments = comments
          .getKeywordComments("relationships");
      Comments intersection = (Comments) javaComments
          .intersection(relationshipsComments);
      intersection.output("Intersection Comments");
    } catch (SelectionException se) {
      log.info("Intersection problem: " + se.getMessage());
    }
  }
View Full Code Here

    }
  }

  private void test08() {
    try {
      Comments comments = getComments();
      Comments javaComments = comments.getKeywordComments("Java");
      if (javaComments.isSubsetOf(comments)) {
        log.info("Yes, it is a subset.");
      } else {
        log.info("No, it is not a subset.");
      }
    } catch (SelectionException se) {
View Full Code Here

  private void test09() {
    try {
      boolean done;
      Session session = getDomainModel().getSession();
      EntitiesAction action = new RemoveAction(session);
      Comments comments = getComments();
      Comment firstComment = (Comment) comments.first();
      action.setEntities(comments);
      action.setEntity(firstComment);
      done = action.execute();
      log.info("Successful Action: " + done);
    } catch (ActionException ae) {
View Full Code Here

  private void test10() {
    try {
      boolean undone;
      Session session = getDomainModel().getSession();
      EntitiesAction action = new RemoveAction(session);
      Comments comments = getComments();
      Comment firstComment = (Comment) comments.first();
      action.setEntities(comments);
      action.setEntity(firstComment);
      action.execute();
      undone = action.undo();
      log.info("Undone Action: " + undone);
View Full Code Here

  private void test11() {
    try {
      boolean allActionsDone;
      Session session = getDomainModel().getSession();
      Transaction transaction = new Transaction(session);
      Comments comments = getComments();
      Comment firstComment = (Comment) comments.first();
      Comment secondComment = (Comment) comments.next(firstComment);
      EntitiesAction action1 = new RemoveAction(transaction);
      action1.setEntities(comments);
      action1.setEntity(firstComment);
      EntitiesAction action2 = new RemoveAction(transaction);
      action2.setEntities(comments);
View Full Code Here

  private void test12() {
    try {
      boolean allActionsUndone;
      Session session = getDomainModel().getSession();
      Transaction transaction = new Transaction(session);
      Comments comments = getComments();
      Comment firstComment = (Comment) comments.first();
      Comment secondComment = (Comment) comments.next(firstComment);
      EntitiesAction action1 = new RemoveAction(transaction);
      action1.setEntities(comments);
      action1.setEntity(firstComment);
      EntitiesAction action2 = new RemoveAction(transaction);
      action2.setEntities(comments);
View Full Code Here

TOP

Related Classes of org.dmlite.model.component.comment.Comments

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.