Examples of RemoveAction


Examples of org.dmlite.model.action.RemoveAction

  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);
    } catch (ActionException ae) {
      log.info("Action problem: " + ae.getMessage());
    }
  }
View Full Code Here

Examples of org.dmlite.model.action.RemoveAction

      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);
      action2.setEntity(secondComment);
      allActionsDone = transaction.execute();
      log.info("Successful Transaction: " + allActionsDone);
    } catch (ActionException ae) {
      log.info("Transaction problem: " + ae.getMessage());
    }
View Full Code Here

Examples of org.dmlite.model.action.RemoveAction

      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);
      action2.setEntity(secondComment);
      transaction.execute();
      allActionsUndone = transaction.undo();
      log.info("Undone Transaction: " + allActionsUndone);
    } catch (ActionException ae) {
      log.info("Transaction problem: " + ae.getMessage());
View Full Code Here

Examples of org.dmlite.model.action.RemoveAction

   * @return <code>true</code> if the entity is removed
   * @throws dmLite
   *             action exception if there is a problem
   */
  public boolean remove(T entity) throws ActionException {
    EntitiesAction entitiesRemoveAction = new RemoveAction();
    entitiesRemoveAction.setEntities(this);
    entitiesRemoveAction.setEntity(entity);
    try {
      if (!preRemove(entity)) {
        return false;
      }

View Full Code Here

Examples of org.mokai.action.RemoveAction

  public void shouldRemoveField() throws Exception {
    Message message = new Message()
      .setProperty("to", "test-to")
      .setProperty("from", "test-from");

    RemoveAction removeAction = new RemoveAction();
    removeAction.setField("to");

    removeAction.execute(message);

    Assert.assertEquals(message.getProperties().size(), 1);
    Assert.assertNull(message.getProperty("to"));
    Assert.assertEquals(message.getProperty("from", String.class), "test-from");
  }
View Full Code Here

Examples of org.mokai.action.RemoveAction

  public void shouldNotRemoveFieldIfDoesntExists() throws Exception {
    Message message = new Message()
      .setProperty("to", "test-to")
      .setProperty("from", "test-from");

    RemoveAction removeAction = new RemoveAction();
    removeAction.setField("unexistent");

    removeAction.execute(message);

    Assert.assertEquals(message.getProperties().size(), 2);
    Assert.assertEquals(message.getProperty("to", String.class), "test-to");
    Assert.assertEquals(message.getProperty("from", String.class), "test-from");
  }
View Full Code Here

Examples of runjettyrun.tabs.action.RemoveAction

   *            composite buttons are contained in
   * @since 3.0
   */
  protected void createPathButtons(Composite pathButtonComp) {

    createButton(pathButtonComp, new RemoveAction(fClasspathViewer));
    createButton(pathButtonComp, new AddProjectAction(fClasspathViewer));
    createButton(pathButtonComp, new AddClassFolderAction(fClasspathViewer));
    createButton(pathButtonComp, new AddJarAction(fClasspathViewer));

    createButton(pathButtonComp, new AddExternalJarAction(fClasspathViewer,
View Full Code Here

Examples of runjettyrun.tabs.action.RemoveAction

    configuration.setAttribute(Plugin.ATTR_IGNORE_SCAN_CLASS_WHEN_DEBUG_MODE, true);

  }

  protected void createPathButtons(Composite pathButtonComp) {
    createButton(pathButtonComp, new RemoveAction(fClasspathViewer));
    createButton(pathButtonComp, new AddFolderAction(fClasspathViewer));
    createButton(pathButtonComp, new AddClassFolderAction(fClasspathViewer));

    createButton(pathButtonComp, new AddExternalFileAction(fClasspathViewer,DIALOG_SETTINGS_PREFIX));
    createButton(pathButtonComp, new AddExternalFolderAction(fClasspathViewer, DIALOG_SETTINGS_PREFIX));
View Full Code Here

Examples of runjettyrun.tabs.action.RemoveAction

   *            composite buttons are contained in
   * @since 3.0
   */
  protected void createPathButtons(Composite pathButtonComp) {

    createButton(pathButtonComp, new RemoveAction(fClasspathViewer));
    createButton(pathButtonComp, new AddProjectAction(fClasspathViewer));
    createButton(pathButtonComp, new AddClassFolderAction(fClasspathViewer));
    createButton(pathButtonComp, new AddJarAction(fClasspathViewer));

    createButton(pathButtonComp, new AddExternalJarAction(fClasspathViewer,
View Full Code Here

Examples of runjettyrun.tabs.action.RemoveAction

   *            composite buttons are contained in
   * @since 3.0
   */
  protected void createPathButtons(Composite pathButtonComp) {

    createButton(pathButtonComp, new RemoveAction(fClasspathViewer));
    createButton(pathButtonComp, new AddProjectAction(fClasspathViewer));
    createButton(pathButtonComp, new AddClassFolderAction(fClasspathViewer));
    createButton(pathButtonComp, new AddJarAction(fClasspathViewer));

    createButton(pathButtonComp, new AddExternalJarAction(fClasspathViewer,
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.