Examples of destinationEntity()


Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

        EOModelGroup modelGroup = EOModelGroup.defaultGroup();
        EOEntity entity = modelGroup.entityNamed(entityName);
        EOAttribute selectedAttribute = null;
        if (relationshipKey() != null && entity.relationshipNamed(relationshipKey()) != null) {
            EORelationship relationship = entity.relationshipNamed(relationshipKey());
            EOEntity destinationEntity = relationship.destinationEntity();
            selectedAttribute = destinationEntity.attributeNamed(key);
        } else {
            selectedAttribute = entity.attributeNamed(key);
        }
        return selectedAttribute.className();
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

            String originEntityName=object().entityName();
            //General case
            for (Enumeration e=joinRelationships.objectEnumerator(); e.hasMoreElements();) {
                EORelationship r=(EORelationship)e.nextElement();
                if (!originEntityName.equals(r.destinationEntity().name())) {
                    _destinationRelationship=r;
                    break;
                }
            }
            // In the case we have a self join relationship we have to be more clever
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

      NSDictionary<String, Object> row, EORelationship relationship, ERMemoryAdaptorContext context) {
    String relationshipPath = relationship.relationshipPath();
    String toJoinKey = ERXStringUtilities.firstPropertyKeyInKeyPath(relationshipPath);
    String toDestKey = ERXStringUtilities.keyPathWithoutFirstProperty(relationshipPath);
    EORelationship toJoinRelationship = entity.anyRelationshipNamed(toJoinKey);
    EOEntity joinEntity = toJoinRelationship.destinationEntity();
    EREntityStore joinStore = context._entityStoreForEntity(joinEntity);
    String sourceAttribute = toJoinRelationship.sourceAttributes().get(0).name();
    String destinationAttribute = toJoinRelationship.destinationAttributes().get(0).name();

    ERXFetchSpecification fs = new ERXFetchSpecification(joinEntity.name(), ERXQ.equals(destinationAttribute,
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

         
          // possibly we have replaced flat relationship with another flat one,
          // let's have a look at it again then
          i--;
        }
        currentEntity = rel.destinationEntity();
      }
    }
    for (int i=0; i<splits.size(); i++) {
      if (i > 0) {
        b.append('.');
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

   
    for (int i=0; i<splits.length - 1; i++) {
      EORelationship rel = currentEntity.relationshipNamed(splits[i]);
     
      rels.add(rel);
      currentEntity = rel.destinationEntity();
    }
   
    // now process the last bit
    String last = splits[splits.length-1];
   
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

    if (_referenceEOs == null) {
      String relationshipName = (String) d2wContext().valueForKey("referenceRelationshipForBackgroupColor");
      if (relationshipName != null) {
        EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName());
        EORelationship relationship = entity.relationshipNamed(relationshipName);
        _referenceEOs = EOUtilities.objectsForEntityNamed(EOSharedEditingContext.defaultSharedEditingContext(), relationship.destinationEntity().name());
        _referenceEOs = ERXArrayUtilities.sortedArraySortedWithKey(_referenceEOs, "ordering", EOSortOrdering.CompareAscending);
      }
    }
    return _referenceEOs;
  }
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

            if (rel != null) {
                if (rel.isFlattened()) {
                    ConfigurationEntry c = configureKeyPath(config, rel.definition() + (rest != null ? "." + rest : ""), source);
                    return c;
                }
                EOEntity destinationEntity = rel.destinationEntity();

                ConfigurationEntry destinationConfiguration;
                if (rest != null) {
                    destinationConfiguration = configureEntity(destinationEntity.name(), new NSArray(rest));
                } else {
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

                                // is
                                // not a class prop, there's nothing we can do.
                                // value =
                                // ec.arrayFaultWithSourceGlobalID(sourceGlobalID,
                                // rel.name(), ec);
                                EOFetchSpecification fs = new EOFetchSpecification(rel.destinationEntity().name(), null, null);
                                NSMutableArray<EOQualifier> qualifiers = new NSMutableArray(rel.joins().count());
                                NSDictionary pk = source.primaryKeyForGlobalID(sourceGlobalID);
                                for (Iterator iterator = rel.joins().iterator(); iterator.hasNext();) {
                                    EOJoin join = (EOJoin) iterator.next();
                                    Object pkValue = pk.objectForKey(join.sourceAttribute().name());
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

            } else {
                EORelationship relationship = d2wContext.relationship();
                if (relationship != null && !(value instanceof EOEnterpriseObject)) {
                    String keyWhenRelationship = (String)d2wContext.valueForKey("keyWhenRelationship");
                    if (keyWhenRelationship != null) {
                        EOEntity destinationEntity = relationship.destinationEntity();
                        attribute = destinationEntity.attributeNamed(keyWhenRelationship);
                    }
                }
            }
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship.destinationEntity()

       
        EORelationship destinationRelationship=null;
        String originEntityName=(String)context.valueForKeyPath("object.entityName");
        for (Enumeration e=relationships.objectEnumerator(); e.hasMoreElements();) {
            EORelationship r=(EORelationship)e.nextElement();
            if (!originEntityName.equals(r.destinationEntity().name())) {
                destinationRelationship=r;
                break;
            }
        }
        return (destinationRelationship!=null ? (destinationRelationship.name()+".") : "") + "userPresentableDescription";
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.