Examples of editingContext()


Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

          log.info("DetailRow: " + debugRow);
        } //~ if (debugRow != null)
        debugRow = new NSMutableDictionary<String, Object>();
        if (currRow instanceof EOEnterpriseObject) {
          EOEnterpriseObject eo = (EOEnterpriseObject) currRow;
          debugRow.takeValueForKey(eo.editingContext().globalIDForObject(eo), "_globalID");
        } //~ if (currRow instanceof EOEnterpriseObject)
      } //~ if (log.isDebugEnabled())
      return true;
    }
    return false;
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

     */
    public static EOArrayDataSource dataSourceForArray(NSArray<? extends EOEnterpriseObject> array) {
        EOArrayDataSource dataSource = null;
        if (array != null && array.count() > 0) {
            EOEnterpriseObject eo = array.objectAtIndex(0);
            dataSource = new EOArrayDataSource(eo.classDescription(), eo.editingContext());
            dataSource.setArray(array);
        }
        return dataSource;
    }

View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

        return false;
    }
   
    public boolean hasChanges() {
        EOEnterpriseObject object = object();
        EOEditingContext ec = object.editingContext();
        boolean result = ec != null && ec.hasChanges();
        if(result) {
            if(object.changesFromSnapshot(ec.committedSnapshotForObject(object)).count() == 0) {
                for (Enumeration e = ec.registeredObjects().objectEnumerator(); e.hasMoreElements();) {
                    EOEnterpriseObject eo = (EOEnterpriseObject) e.nextElement();
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

    public static EOQualifier localInstancesInQualifier(EOEditingContext ec, EOQualifier q) {
        if (q instanceof EOKeyValueQualifier) {
            EOKeyValueQualifier q1 = (EOKeyValueQualifier)q;
            if (q1.value() instanceof EOEnterpriseObject) {
                EOEnterpriseObject eo = (EOEnterpriseObject)q1.value();
                if (eo.editingContext() != ec && !ERXEOControlUtilities.isNewObject(eo)) {
                    eo = EOUtilities.localInstanceOfObject(ec, eo);
                    EOKeyValueQualifier qual = new EOKeyValueQualifier(q1.key(), q1.selector(), eo);
                    return qual;
                }
            }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

    public static NSArray globalIDsForObjects(NSArray eos) {
        int c = eos != null ? eos.count() : 0;
        NSMutableArray ids = new NSMutableArray(c);
        for (int i = 0; i < c; i++) {
            EOEnterpriseObject eo = (EOEnterpriseObject)eos.objectAtIndex(i);
            EOEditingContext ec = eo.editingContext();
            EOGlobalID gid = ec.globalIDForObject(eo);
            ids.addObject(gid);
        }
        return ids;
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

    */
   public static Object convertEOtoGID(Object obj) {
     Object result;
     if (obj instanceof EOEnterpriseObject) {
       EOEnterpriseObject eoful = (EOEnterpriseObject)obj;
       EOGlobalID gidful = eoful.editingContext().globalIDForObject(eoful);
       result = gidful;
     }
     else if (obj instanceof IERXEOContainer) {
       result = ((IERXEOContainer)obj).toGIDContainer();
     }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

    public static NSArray snapshotsForObjectsFromRelationshipNamed(NSArray eos, String relKey) {
      NSMutableArray result = new NSMutableArray();
      if (eos.count() > 0) {
        EOEnterpriseObject eo = (EOEnterpriseObject)eos.lastObject();
        String entityName = eo.entityName();
        EOEditingContext ec = eo.editingContext();
        EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
        EORelationship relationship = entity.relationshipNamed(relKey);
        if(relationship.sourceAttributes().count() == 1) {
          EOAttribute attribute = relationship.sourceAttributes().lastObject();
          EODatabaseContext context = EOUtilities.databaseContextForModelNamed(ec, entity.model().name());
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

     *    into
     * @return actor instance in the given editing context
     */
    public static EOEnterpriseObject actor(EOEditingContext ec) {
        EOEnterpriseObject actor = actor();
        if (actor != null && actor.editingContext() != ec) {
            EOEditingContext actorEc = actor.editingContext();
            actorEc.lock();
            try {
              EOEnterpriseObject localActor = ERXEOControlUtilities.localInstanceOfObject(ec, actor);
              try {
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

     * @return actor instance in the given editing context
     */
    public static EOEnterpriseObject actor(EOEditingContext ec) {
        EOEnterpriseObject actor = actor();
        if (actor != null && actor.editingContext() != ec) {
            EOEditingContext actorEc = actor.editingContext();
            actorEc.lock();
            try {
              EOEnterpriseObject localActor = ERXEOControlUtilities.localInstanceOfObject(ec, actor);
              try {
                if(actor instanceof ERCoreUserInterface) {
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.editingContext()

            Object object = realSourceObject();
            String key = realRelationshipKey();
            Object selection = NSKeyValueCoding.Utility.valueForKey(object,key);
            if (selection != null && selection instanceof EOEnterpriseObject) {
              EOEnterpriseObject eo = (EOEnterpriseObject)selection;
              if (eo.editingContext() != editingContext()) {
                selection = ERXEOControlUtilities.localInstanceOfObject(editingContext(), eo);
              }
            }

            setSelection(selection);
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.