Package jfix.functor

Examples of jfix.functor.Command


    lock.writeLock().lock();
    try {
      if (transactionInProgress) {
        traverseAndSave(persistent);
      } else {
        write(new Command() {
          public void run() {
            save(persistent);
          }
        });
      }
View Full Code Here


        }
      }
      if (transactionInProgress) {
        traverseAndDelete(persistent);
      } else {
        write(new Command() {
          public void run() {
            delete(persistent);
          }
        });
      }
View Full Code Here

    lock.writeLock().lock();
    try {
      if (transactionInProgress) {
        traverseAndDelete(persistent);
      } else {
        write(new Command() {
          public void run() {
            deleteDeliberately(persistent);
          }
        });
      }
View Full Code Here

  /**
   * Saves all changes of a given node to database.
   */
  public static void save(final Node node) {
    Database.write(new Command() {
      public void run() {
        node.markChanged();
        persistChanges();
      }
    });
View Full Code Here

  /**
   * Deletes given node from repository.
   */
  public static void delete(final Node node) {
    Database.write(new Command() {
      public void run() {
        node.detach();
        persistChanges();
      }
    });
View Full Code Here

  /**
   * Deletes all linkcheck objects from database with given path.
   */
  public static void clear() {
    Database.write(new Command() {
      public void run() {
        for (Linkcheck linkcheck : Database.query(Linkcheck.class)) {
          Database.delete(linkcheck);
        }
      }
View Full Code Here

    if (!oldPath.equals(newPath)
        && Validations.isEmpty(Nodes.getByPath(newPath).getParents(
            Trash.class))) {
      final String target = "./~" + oldPath;
      final String replacement = "./~" + newPath;
      Database.write(new Command() {
        public void run() {
          for (Content content : searchContent(target)) {
            content.replace(target, replacement);
            Database.save(content);
          }
View Full Code Here

TOP

Related Classes of jfix.functor.Command

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.