Package com.webobjects.eocontrol

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


    private NSArray<T> relevantChanges(NSDictionary dict, String key) {
      NSMutableArray<T> releventEOs = null;
        NSArray<EOEnterpriseObject> eos = (NSArray<EOEnterpriseObject>) dict.objectForKey(key);
        for (Enumeration enumeration = eos.objectEnumerator(); enumeration.hasMoreElements();) {
            EOEnterpriseObject eo = (EOEnterpriseObject) enumeration.nextElement();
            if(eo.entityName().equals(entityName())) {
              if (releventEOs == null) {
                releventEOs = new NSMutableArray();
              }
              releventEOs.addObject((T)eo);
            }
View Full Code Here


            lastKey=key;
        } else {
            String partialKeyPath=KeyValuePath.keyPathWithoutLastProperty(key);
            EOEnterpriseObject objectForPropertyDisplayed=(EOEnterpriseObject)object.valueForKeyPath(partialKeyPath);
            if (objectForPropertyDisplayed!=null) {
                entity=EOModelGroup.defaultGroup().entityNamed(objectForPropertyDisplayed.entityName());
                lastKey=KeyValuePath.lastPropertyKeyInKeyPath(key);
            }
        }
        if (entity!=null && lastKey!=null) {
            Object property=entity.attributeNamed(lastKey);
View Full Code Here

  protected NSArray<T> relevantChanges(EOEditingContext editingContext, NSDictionary dict, String key) {
    NSArray allObjects = (NSArray) dict.objectForKey(key);
    NSMutableArray<T> changedObjects = new NSMutableArray<T>();
    for (Enumeration enumeration = allObjects.objectEnumerator(); enumeration.hasMoreElements();) {
      EOEnterpriseObject eo = (EOEnterpriseObject) enumeration.nextElement();
      String changedEntityName = eo.entityName();
      if (isRelevant(editingContext, changedEntityName)) {
        changedObjects.addObject((T) eo);
        if (!_trackAllChanges) {
          break;
        }
View Full Code Here

      else {
        type = "K";
        pkStr = ERXEOControlUtilities.primaryKeyStringForObject(eo);
        pkStr = ERXStringUtilities.urlEncode(pkStr);
      }
      obj.put("gid", ecid + "/" + eo.entityName() "/" + type + "/" + pkStr);

      addAttributes(state, eo, obj);
      return obj;
    }
    catch (JSONException e) {
View Full Code Here

    public String entityName() {
        String entityName = (String)valueForBinding("entityName");
        if(entityName == null) {
            EOEnterpriseObject eo = (EOEnterpriseObject)valueForBinding("object");
            if(eo != null)
                entityName = eo.entityName();
        }
        return entityName;
    }
   
    /**
 
View Full Code Here

                    D2WContext context = (D2WContext) sender.valueForKey("d2wContext");
                    Object o = ex.object();

                    if (o instanceof EOEnterpriseObject) {
                        EOEnterpriseObject eo = (EOEnterpriseObject) o;
                        context.takeValueForKey(eo.entityName(), "entityName");
                        context.takeValueForKey(ex.propertyKey(), "propertyKey");
                    }
                    ((ERXValidationException) exception).setContext(context);
                }
                log.info("Validation Exception: " + exception + exception.getMessage());
View Full Code Here

                String partialKeyPath=KeyValuePath.keyPathWithoutLastProperty(propertyKey);
                Object rawLastEO=object.valueForKeyPath(partialKeyPath);
                lastEO=rawLastEO instanceof EOEnterpriseObject ? (EOEnterpriseObject)rawLastEO : null;
            }
            if (lastEO!=null) {
                EOEntity entity=EOModelGroup.defaultGroup().entityNamed(lastEO.entityName());
                String lastKey=KeyValuePath.lastPropertyKeyInKeyPath(propertyKey);
                result=entity.attributeNamed(lastKey);
            }
        }
        if (result==null) {
View Full Code Here

                    String partialKeyPath=KeyValuePath.keyPathWithoutLastProperty(propertyKey);
                    Object rawLastEO=object.valueForKeyPath(partialKeyPath);
                    lastEO=rawLastEO instanceof EOEnterpriseObject ? (EOEnterpriseObject)rawLastEO : null;
                }
                if (lastEO!=null) {
                    EOEntity entity=EOModelGroup.defaultGroup().entityNamed(lastEO.entityName());
                    String lastKey=KeyValuePath.lastPropertyKeyInKeyPath(propertyKey);
                    result=entity.relationshipNamed(lastKey);
                }
            }
            if (result==null) {
View Full Code Here

                String partialKeyPath=KeyValuePath.keyPathWithoutLastProperty(propertyKey);
                Object rawLastEO=object.valueForKeyPath(partialKeyPath);
                lastEO=rawLastEO instanceof EOEnterpriseObject ? (EOEnterpriseObject)rawLastEO : null;
            }
            if (lastEO!=null) {
                EOEntity entity=EOModelGroup.defaultGroup().entityNamed(lastEO.entityName());
                String lastKey=KeyValuePath.lastPropertyKeyInKeyPath(propertyKey);
                result=entity.attributeNamed(lastKey);
            }
        }
        if (result==null) {
View Full Code Here

                    Object rawLastEO=object.valueForKeyPath(partialKeyPath);
                    lastEO=rawLastEO instanceof EOEnterpriseObject ? (EOEnterpriseObject)rawLastEO : null;
                }
                if (lastEO!=null) {
                    // FIXME: Should be using the model group from the ec of the lastEO.
                    EOEntity entity=EOModelGroup.defaultGroup().entityNamed(lastEO.entityName());
                    String lastKey=KeyValuePath.lastPropertyKeyInKeyPath(propertyKey);
                    result=entity.relationshipNamed(lastKey);
                }
            }
            if (result==null) {
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.