Package com.webobjects.eocontrol

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


          if (company == null) {
            company = Company.createCompany(ec, name);
          }
          companies.addObject(company);
    }
        ec.saveChanges();
       
        employee = Employee.fetchEmployee(ec, ERXQ.and(ERXQ.equals(Employee.FIRST_NAME_KEY, "Bill"),
                                   ERXQ.equals(Employee.LAST_NAME_KEY, "Wratchit")));
        if (employee == null) {
            Company company = Company.fetchCompany(ec, Company.NAME_KEY, companyNames.objectAtIndex(2));
View Full Code Here


                                   ERXQ.equals(Employee.LAST_NAME_KEY, "Wratchit")));
        if (employee == null) {
            Company company = Company.fetchCompany(ec, Company.NAME_KEY, companyNames.objectAtIndex(2));
            employee = Employee.createEmployee(ec, "Bill", "Wratchit", company);
        }
        ec.saveChanges();
  }

 
   
    /**
 
View Full Code Here

        eo.takeValueForKey(new NSTimestamp().timestampByAddingGregorianUnits(0, 0, -random.nextInt(2500), 0, 0, 0), "creationDate");
        eo.takeValueForKey(ERXLoremIpsumGenerator.randomSentence(), "contents");
        eo.takeValueForKey(random.nextDouble(), "price");
        eo.takeValueForKey(Long.valueOf(random.nextInt(2500)), "userCount");
      }
      ec.saveChanges();
    } finally {
      ec.unlock();
    }
    return pageWithName(Main.class.getName());
  }
View Full Code Here

        } else {
          log.debug(_numberToCheck + " is not a prime number but is a COMPOSITE number.");
          resultItem.setIsPrime(Boolean.FALSE);
        }
       
        ec.saveChanges();
       
       
        _elapsedTime = System.currentTimeMillis() - startTime;
       
        // Update progress variables
View Full Code Here

      // Complete the stats
      taskInfo.setEndNumber(_numberToCheck - 1);
      taskInfo.setEndTime(new NSTimestamp());
      taskInfo.setWorkflowState(TaskInfo.WORKFLOW_PRIME_CHECKED);
     
      ec.saveChanges();
     
      _resultGid = ec.globalIDForObject(taskInfo);
     
    } finally {
      ec.unlock();
View Full Code Here

        if(_masterObject != null) {
            EOEditingContext ec = _masterObject.editingContext();
            ec.lock();
            try {
                _masterObject.takeValueForKey(singleSelection() ? selectedObjects().lastObject() : selectedObjects(), _relationshipKey);
                ec.saveChanges();
            } finally {
                ec.unlock();
            }
        }
        return super.backAction();
View Full Code Here

            log.info("eofStore: " + eofStore.findGlobalIDs(groupQualifier).count());
           
            String newName = "cooltest";
            tagQualifier = new EOKeyValueQualifier("tags.name", com.webobjects.eocontrol.EOQualifier.QualifierOperatorEqual, newName);
            tag.setName(newName + " " + System.currentTimeMillis());
            ec.saveChanges();
           
            assetGroup.setName(newName + "  " + System.currentTimeMillis());
            ec.saveChanges();
            log.info("fileStore 1: " + fileStore.findGlobalIDs(tagQualifier).count());
            log.info("eofStore 1: " + eofStore.findGlobalIDs(tagQualifier).count());
View Full Code Here

            tagQualifier = new EOKeyValueQualifier("tags.name", com.webobjects.eocontrol.EOQualifier.QualifierOperatorEqual, newName);
            tag.setName(newName + " " + System.currentTimeMillis());
            ec.saveChanges();
           
            assetGroup.setName(newName + "  " + System.currentTimeMillis());
            ec.saveChanges();
            log.info("fileStore 1: " + fileStore.findGlobalIDs(tagQualifier).count());
            log.info("eofStore 1: " + eofStore.findGlobalIDs(tagQualifier).count());
            try {
                if(true) {
                    Thread.sleep(2000);
View Full Code Here

      taskInfo.setStartTime(new NSTimestamp(startTime));
     
      taskInfo.setStartNumber(_startNumber);
      taskInfo.setDuration(_taskDuration);
     
      ec.saveChanges();
      _resultGid = ec.globalIDForObject(taskInfo);
      _parentTaskPrimaryKey = (Integer) taskInfo.rawPrimaryKey();
     
      // Initialize loop variables
      long childTaskStartNumber = _startNumber;
View Full Code Here

      // Refresh it since the object has been already updated (its relationship) and saved on ChildThreads
      ERXEOControlUtilities.refreshObject(taskInfo);
      taskInfo.setEndNumber(_endNumber);
      taskInfo.setEndTime(new NSTimestamp());
      taskInfo.setWorkflowState(TaskInfo.WORKFLOW_PRIME_CHECKED);
      ec.saveChanges();
     
      _resultGid = ec.globalIDForObject(taskInfo);
     
    } finally {
      ec.unlock();
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.