Examples of globalIDForObject()


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

          anEntityName);
      EORelationship aRelationship = anEntity.relationshipNamed(aKey);

      if (aRelationship != null) {
        EOEditingContext anEditingContext = editingContext();
        EOGlobalID aGlobalID = anEditingContext.globalIDForObject(this);
        String aModelName = anEntity.model().name();
        EODatabaseContext aDatabaseContext = EOUtilities
            .databaseContextForModelNamed(anEditingContext,
                aModelName);
        aDatabaseContext.lock();
View Full Code Here

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

  public EOKeyGlobalID permanentGlobalID(boolean generateIfMissing) {
    if (_permanentGlobalID == null) {
      final EOEditingContext ec = editingContext();

      if (ec != null) {
        final EOGlobalID gid = ec.globalIDForObject(this);

        if (!gid.isTemporary()) {
          _permanentGlobalID = (EOKeyGlobalID) gid;
        }
        else if (generateIfMissing) {
View Full Code Here

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

      EOEditingContext ec = eo.editingContext();
      String ecid = registerEditingContext(ec);
      String type;
      String pkStr;
      EOGlobalID gid = ec.globalIDForObject(eo);
      if (gid instanceof EOTemporaryGlobalID) {
        type = "T";
        byte[] bytes = ((EOTemporaryGlobalID)gid)._rawBytes();
        pkStr = ERXStringUtilities.byteArrayToHexString(bytes);
      }
View Full Code Here

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

      taskInfo.setEndTime(new NSTimestamp());
      taskInfo.setWorkflowState(TaskInfo.WORKFLOW_PRIME_CHECKED);
     
      ec.saveChanges();
     
      _resultGid = ec.globalIDForObject(taskInfo);
     
    } finally {
      ec.unlock();
    }
   
View Full Code Here

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

     
      taskInfo.setStartNumber(_startNumber);
      taskInfo.setDuration(_taskDuration);
     
      ec.saveChanges();
      _resultGid = ec.globalIDForObject(taskInfo);
      _parentTaskPrimaryKey = (Integer) taskInfo.rawPrimaryKey();
     
      // Initialize loop variables
      long childTaskStartNumber = _startNumber;
      int incrementQuantity = _childBatchBaseQuantity + Utilities.sharedRandom().nextInt(_childBatchBaseQuantity);
View Full Code Here

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

      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

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

      taskInfo.setEndTime(new NSTimestamp());
      taskInfo.setWorkflowState(TaskInfo.WORKFLOW_PRIME_CHECKED);
     
      ec.saveChanges();
     
      _resultGid = ec.globalIDForObject(taskInfo);
     
    } finally {
      ec.unlock();
    }
   
View Full Code Here

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

                                    log.error("We currently don't support unsaved related objects for this entity: " + entityName);
                                    _warned.addObject(entityName);
                                }
                            } else {
                                EORelationship rel = source.anyRelationshipNamed(key);
                                EOKeyGlobalID sourceGlobalID = (EOKeyGlobalID) ec.globalIDForObject(eo);
                                // AK: I wish I could, but when a relationship
                                // is
                                // not a class prop, there's nothing we can do.
                                // value =
                                // ec.arrayFaultWithSourceGlobalID(sourceGlobalID,
View Full Code Here

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

      if (editingContext != null) {
        editingContext.lock();
        try {
          pkValue = ERXEOControlUtilities.primaryKeyObjectForObject(eo);
          if (pkValue == null) {
            EOGlobalID gid = editingContext.globalIDForObject(eo);
            if (gid instanceof EOTemporaryGlobalID) {
              pkValue = new NSData(((EOTemporaryGlobalID) gid)._rawBytes());
            }
          }
        }
View Full Code Here

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

     * @param object    EOEnterpriseObject to invalidate
     */
    public static void invalidateObject(EOEnterpriseObject object){
        if(object != null){
            EOEditingContext ec = object.editingContext();
            EOGlobalID globalID = ec.globalIDForObject(object);
            //invalidate the object
            if(globalID != null){
                NSArray globalIDs = new NSArray(globalID);
                ec.invalidateObjectsWithGlobalIDs(globalIDs);
            }
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.