Examples of faultForGlobalID()


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

            eo = ec.objectForGlobalID(gid);
          }
          else {
            pk = ERXStringUtilities.urlDecode(pk);
            gid = ERXEOControlUtilities.globalIDForString(ec, entityName, pk);
            eo = ec.faultForGlobalID(gid, ec);
          }
        }
        else if (_canInsert(entityName)) {
          eo = ERXEOControlUtilities.createAndInsertObject(ec, entityName);
        }
View Full Code Here

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

      EOEditingContext ec = newEditingContext();
      ec.lock();
      try {
        log.info("Started child in " + Thread.currentThread().getName() + " with OSC " + ec.parentObjectStore());
       
        TaskInfo taskInfo = (TaskInfo) ec.faultForGlobalID(_childTaskInfoGID, ec);
       
        while (_childCurrentNumber <= _childToNumber) {
          ResultItem resultItem = ERXEOControlUtilities.createAndInsertObject(ec, ResultItem.class);
          resultItem.setTaskInfo(taskInfo);
         
View Full Code Here

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

      // We create an ec just for the sake of the constructor API on
      // T06EOFFactorialUpdateTask
      EOEditingContext ec = newEditingContext();
      ec.lock();
      try {
        TaskInfo taskInfo = (TaskInfo) ec.faultForGlobalID(_taskInfoGID, ec);
        _task2 = new T06EOFFactorialUpdateTask(taskInfo);
      } finally {
        ec.unlock();
      }
     
View Full Code Here

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

      // Finally, overwrite the startTime and Duration to reflect this combo task
      // rather than the last task.
      ec = newEditingContext();
      ec.lock();
      try {
        TaskInfo taskInfo = (TaskInfo) ec.faultForGlobalID(_taskInfoGID, ec);
        taskInfo.setStartTime(new NSTimestamp(startTime));
        taskInfo.setDuration(Long.valueOf(taskInfo.endTime().getTime() - startTime));
        ec.saveChanges();
      } finally {
        ec.unlock();
View Full Code Here

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

    // Note we use the superclass convenience method here.
    EOEditingContext ec = newEditingContext();
    ec.lock();
    try {
      // Fetch the TaskInfo
      TaskInfo taskInfo = (TaskInfo) ec.faultForGlobalID(_taskInfoGID, ec);
      _totalCount = taskInfo.countResultItems().longValue();
     
      // Task start time
      // This is a demo, so we are going to replace the prime processing times with the factorial processing times
      taskInfo.setStartTime(new NSTimestamp(startTime));
View Full Code Here

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

    return null;
  }
 
  public WOActionResults showDetailsAction() {
    EOEditingContext ec = ERXEC.newEditingContext();
    Movie movie = (Movie)ec.faultForGlobalID(currentDocument().eoKeyGlobalId(), ec);
   
    MovieDetails nextPage = (MovieDetails)pageWithName(MovieDetails.class.getName());
    nextPage.setMovie(movie);

    return nextPage;
View Full Code Here

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

            } else {
                if (adaptorType == AdaptorNumberType) {
                    defaultValue = Integer.valueOf(stringValue);
                }
                EOGlobalID gid = EOKeyGlobalID.globalIDWithEntityName(relationshipEntityName, new Object[] {defaultValue});
                EOEnterpriseObject fault = ec.faultForGlobalID(gid,ec);
                eo.addObjectToBothSidesOfRelationshipWithKey(fault,key);
            }
        }
    }
View Full Code Here

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

                    NSArray gids = (NSArray) entries.objectForKey(sourceGid);
                    if(gids != null) {
                        NSMutableArray eos = new NSMutableArray(gids.count());
                        for (Enumeration enumerator = gids.objectEnumerator(); enumerator.hasMoreElements();) {
                            EOGlobalID gid = (EOGlobalID) enumerator.nextElement();
                            EOEnterpriseObject eo = ec.faultForGlobalID(gid, ec);
                            eos.addObject(eo);
                        }
                        EOFaultHandler.clearFault(obj);
                        ((NSMutableArray)fault).addObjectsFromArray(eos);
                        return true;
View Full Code Here

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

    }
    editingContext.lock();
    Object obj;
    try {
      EOGlobalID gid = ERXEOControlUtilities.globalIDForString(editingContext, entity.entityName(), strPKValue);
      return editingContext.faultForGlobalID(gid, editingContext);
    }
    finally {
      editingContext.unlock();
    }
  }
View Full Code Here

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

                }
            }
            EOEntity destEnt = relationship.destinationEntity();
            EOGlobalID gid = destEnt.globalIDForRow(pk);
            if(gid != null) {
                EOEnterpriseObject destEO = ec.faultForGlobalID(gid, ec);
                eo.takeValueForKey(destEO, relationship.name());
            } else {
                throw new NullPointerException("Gid is null: " + pk);
            }
        }
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.