Examples of destinationEntity()


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

        relationshipKey = dotIndex == -1
            ? relationshipKey
            : relationshipKey.substring( relationshipKey.lastIndexOf( "." ) + 1 );
        r = rightEntity.anyRelationshipNamed( relationshipKey );
        // fix from Michael Müller for the case Foo.fooBars.bar has a Bar.foo relationship (instead of Bar.foos)
        if( r == null || r.destinationEntity() != leftEntity ) {
            r = leftEntity.anyRelationshipNamed( relationshipKey );
        }
        //timc 2006-02-26 IMPORTANT or quotes are ignored and mixed case field names won't work
        String rightTable;
        String leftTable;
View Full Code Here

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

                if (ent.anyAttributeNamed(k) != null) {
                    break;
                }
                throw new IllegalArgumentException("relationship " + keyPath + " generated null");
            }
            ent = rel.destinationEntity();
        }
        return ent;
    }
   
    /**
 
View Full Code Here

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

            if(relationship == null) {
              // CHECKME AK:  it would probably be better to return null
              // to indicate that this is not a valid path?
              return NSArray.EmptyArray;
            }
            entity = relationship.destinationEntity();
            result.addObject(relationship);
        }
        part = parts[parts.length-1];
        EOAttribute attribute = entity.anyAttributeNamed(part);
        if(attribute == null) {
View Full Code Here

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

                    }
                  }
                }
                return null;
            }
            entity = rel.destinationEntity();
        }
        return entity;
    }

    /** Returns the EOEntity for the provided EOEnterpriseObject if one exists
View Full Code Here

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

                if(pk.objectForKey(key) != null) {
                    Object val = changedValues.objectForKey(key);
                    pk.setObjectForKey(val, key);
                }
            }
            EOEntity destEnt = relationship.destinationEntity();
            EOGlobalID gid = destEnt.globalIDForRow(pk);
            if(gid != null) {
                EOEnterpriseObject destEO = ec.faultForGlobalID(gid, ec);
                eo.takeValueForKey(destEO, relationship.name());
            } else {
View Full Code Here

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

               String prefix = "";
                 if(path.count() > 1) {
                     for (int i = 0; i < path.count() - 1; i++) {
                         String part = (String) path.objectAtIndex(i);
                         EORelationship rel = entity.anyRelationshipNamed(part);
                         entity = rel.destinationEntity();
                         prefix += part + ".";
                     }
                 }
                     if(entity.attributeNamed(attributeName) == null) {
                       EOClassDescription cd = entity.classDescriptionForInstances();
View Full Code Here

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

                       EOQualifier qualifier = relationship.qualifierWithSourceRow(database.snapshotForGlobalID(keyGID));
                       EOFetchSpecification relationshipFetchSpec = new EOFetchSpecification(entityName, qualifier, null);
                       EOAdaptorChannel channel = databaseContext.availableChannel().adaptorChannel();
                       channel.openChannel();
                       try {
                         channel.selectAttributes(relationship.destinationEntity().attributesToFetch(), relationshipFetchSpec, false, relationship.destinationEntity());
                         NSDictionary destinationSnapshot = null;
                         do {
                           destinationSnapshot = channel.fetchRow();
                           if (destinationSnapshot != null) {
                             EOGlobalID destinationGID = relationship.destinationEntity().globalIDForRow(destinationSnapshot);
View Full Code Here

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

                       EOQualifier qualifier = relationship.qualifierWithSourceRow(database.snapshotForGlobalID(keyGID));
                       EOFetchSpecification relationshipFetchSpec = new EOFetchSpecification(entityName, qualifier, null);
                       EOAdaptorChannel channel = databaseContext.availableChannel().adaptorChannel();
                       channel.openChannel();
                       try {
                         channel.selectAttributes(relationship.destinationEntity().attributesToFetch(), relationshipFetchSpec, false, relationship.destinationEntity());
                         NSDictionary destinationSnapshot = null;
                         do {
                           destinationSnapshot = channel.fetchRow();
                           if (destinationSnapshot != null) {
                             EOGlobalID destinationGID = relationship.destinationEntity().globalIDForRow(destinationSnapshot);
View Full Code Here

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

                         channel.selectAttributes(relationship.destinationEntity().attributesToFetch(), relationshipFetchSpec, false, relationship.destinationEntity());
                         NSDictionary destinationSnapshot = null;
                         do {
                           destinationSnapshot = channel.fetchRow();
                           if (destinationSnapshot != null) {
                             EOGlobalID destinationGID = relationship.destinationEntity().globalIDForRow(destinationSnapshot);
                             newDestinationGIDs.addObject(destinationGID);
                           }
                         }
                         while (destinationSnapshot != null);
                       }
View Full Code Here

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

    else if (!tagsRelationship.isFlattened()) {
      throw new IllegalArgumentException("The relationship '" + tagsRelationship.name() + "' on '" + entity.name() + "' must be flattened.");
    }
    else {
      EORelationship itemToJoinRelationship = (EORelationship) tagsRelationship.componentRelationships().objectAtIndex(0);
      joinEntity = itemToJoinRelationship.destinationEntity();
    }

    NSMutableDictionary userInfo = entity.userInfo().mutableClone();
    userInfo.setObjectForKey(Boolean.TRUE, ERTaggableEntity.ERTAGGABLE_KEY);
    userInfo.setObjectForKey(tagsRelationship.name(), ERTaggableEntity.ERTAGGABLE_TAG_RELATIONSHIP_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.