Examples of toManyRelationshipKeys()


Examples of com.webobjects.eocontrol.EOClassDescription.toManyRelationshipKeys()

      NSArray<String> relationshipNames = _includedRelationshipNames(source);
     
      for (Enumeration e = attributeNames.objectEnumerator(); e.hasMoreElements();) {
        String key = (String) e.nextElement();
        Object jsonValue;
        if(cd.toManyRelationshipKeys().containsObject(key)) {
          if (relationshipNames.containsObject(key)) {
            Object value = source.valueForKey(key);
            jsonValue = ser.marshall(state, source, value, key);
          }
          else {
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.toManyRelationshipKeys()

          for (ERXKey<?> remainingKey : remainingKeys) {
            String keyName = remainingKey.key();
            if (nonModelClassDescription.attributeKeys().containsObject(keyName)) {
              _addAttributeNodeForKeyInObject(remainingKey, obj, keyFilter);
            }
            else if (nonModelClassDescription.toManyRelationshipKeys().containsObject(keyName)) {
              _addToManyRelationshipNodeForKeyOfEntityInObject(remainingKey, nonModelClassDescription.classDescriptionForDestinationKey(keyName), obj, keyFilter, context, visitedObjects);
            }
            else if (nonModelClassDescription.toOneRelationshipKeys().containsObject(keyName)) {
              _addToOneRelationshipNodeForKeyInObject(remainingKey, obj, nonModelClassDescription.classDescriptionForDestinationKey(keyName), keyFilter, context, visitedObjects);
            }
View Full Code Here

Examples of com.webobjects.eocontrol.EOClassDescription.toManyRelationshipKeys()

          EOClassDescription destinationClassDescription;
          // this is sort of expensive, but we want to support non-eomodel to-many relationships on EO's, so
          // we fallback and lookup the class entity ...
          if (!classDescription.toManyRelationshipKeys().containsObject(keyName) && classDescription instanceof EOEntityClassDescription) {
            EOClassDescription nonModelClassDescription = ERXRestClassDescriptionFactory.classDescriptionForObject(obj, true);
            if (!nonModelClassDescription.toManyRelationshipKeys().containsObject(keyName)) {
              throw new IllegalArgumentException("There is no to-many relationship named '" + key.key() + "' on '" + classDescription.entityName() + "'.");
            }
            destinationClassDescription = classDescription.classDescriptionForDestinationKey(keyName);
          }
          else {
View Full Code Here

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

            String key = (String) iterator.next();
            if(!("javaClass".equals(key) || "gid".equals(key))) {
              Object value = eoDict.get(key);
              Object obj = ser.unmarshall(state, null, value);
              if (attributeNames.containsObject(key)) {
                if (obj == null && !relationshipNames.containsObject(key) && (eo.toOneRelationshipKeys().containsObject(key) || eo.toManyRelationshipKeys().containsObject(key))) {
                  // ignore nulls for non-included relationships
                }
                else {
                  eo.takeValueForKey(obj, key);
                }
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.