Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOEditingContext.unlock()


      ec.lock();
      EOEnterpriseObject company = EOUtilities.createAndInsertInstance(ec, "Company");
      company.takeValueForKey("SomeBody.com", "name");
      ec.saveChanges();
      ec.unlock();

      start();

      String lastName = Thread.currentThread().getName() + System.currentTimeMillis() + "Person";
View Full Code Here


        EOEnterpriseObject eo = EOUtilities.createAndInsertInstance(ec, "Employee");
        eo.addObjectToBothSidesOfRelationshipWithKey(company, "company");
        eo.takeValueForKey(Boolean.TRUE, "manager");
        eo.takeValueForKey("Bob" + idx, "name");
        eo.takeValueForKey(lastName, "state");
        ec.unlock();
      }
      ec.lock();
      ec.saveChanges();
      ec.unlock();
View Full Code Here

        eo.takeValueForKey(lastName, "state");
        ec.unlock();
      }
      ec.lock();
      ec.saveChanges();
      ec.unlock();

      ec.lock();
      NSArray rowsInserted = EOUtilities.objectsMatchingKeyAndValue(ec, "Employee", "state", lastName);
      boolean insertOk = (rowsInserted.count() == iters);
View Full Code Here

      for (int idx = 0; idx < iters; idx++) {
        ec.deleteObject((EOEnterpriseObject) rowsInserted.get(idx));
      }
      ec.saveChanges();
      ec.unlock();

      ec.lock();
      NSArray rowsDeleted = EOUtilities.objectsMatchingKeyAndValue(ec, "Employee", "state", lastName);
      ec.unlock();
View Full Code Here

      ec.saveChanges();
      ec.unlock();

      ec.lock();
      NSArray rowsDeleted = EOUtilities.objectsMatchingKeyAndValue(ec, "Employee", "state", lastName);
      ec.unlock();

      boolean deleteOk = (rowsDeleted.count() == 0);

      ec.lock();
      ec.deleteObject(company);
View Full Code Here

      boolean deleteOk = (rowsDeleted.count() == 0);

      ec.lock();
      ec.deleteObject(company);
      ec.saveChanges();
      ec.unlock();

      end();

      print("RESULT", ((insertOk && deleteOk) ? "OK" : "FAILED"));
    }
View Full Code Here

      p.setEmployeeRelationship(e1);
     
      ec.saveChanges();
      return ec.globalIDForObject(c);
    } finally {
      ec.unlock();
    }
  }
 
  /**
   * Convenience for simple tests.
View Full Code Here

      Company c = (Company) EOUtilities.createAndInsertInstance(ec, Company.ENTITY_NAME);
      c.setName("Disney World");
      ec.saveChanges();
      return ec.globalIDForObject(c);
    } finally {
      ec.unlock();
    }
  }

  public static void deleteObjectsWithPrefix(EOEditingContext ec, NSArray<Object> eos) {
    for (Object obj : eos) {
View Full Code Here

      if(copy != null && !copy.isRead() && copy.owner().equals(people)) {
        copy.setIsRead(true);
        ec.saveChanges();
      }
    } finally {
      ec.unlock();
    }
  }
   
    public void markUnread() {
        setIsRead(false);
View Full Code Here

                releases.addObject(event);
            }
            calendar.addEventsFromArray(releases);
            return calendar;
        } finally {
            ec.unlock();
        }
    }
    public WOComponent pingAction() {
        WOComponent result = null;
        EOEditingContext ec = ERXEC.newEditingContext();
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.