Examples of anyRelationshipNamed()


Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

            if (entity.anyRelationshipNamed(key) != null) { // Test first for a relationship.
                rel = entity.anyRelationshipNamed(key);
                if (rel.isFlattened()) {
                    String relPath = rel.relationshipPath();
                    for (String relPart : NSArray.componentsSeparatedByString(relPath, ".")) {
                        rel = entity.anyRelationshipNamed(relPart);
                        path.addObject(rel);
                        entity = rel.destinationEntity();
                    }
                } else {
                    path.addObject(rel);
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

            EOEntity targetEntity=e.entity();

            NSArray<String> toManyKeys=NSArray.componentsSeparatedByString(qualifier.key(),".");
            EORelationship targetRelationship=null;
            for (int i=0; i<toManyKeys.count()-1;i++) {
                targetRelationship= targetEntity.anyRelationshipNamed(toManyKeys.objectAtIndex(i));
                targetEntity=targetRelationship.destinationEntity();
            }
            targetRelationship=targetEntity.relationshipNamed(toManyKeys.lastObject());
            targetEntity=targetRelationship.destinationEntity();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

      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);
      }

      String rightTable = rightEntity.valueForSQLExpression(this);
      String leftTable = leftEntity.valueForSQLExpression(this);
      JoinClause jc = new JoinClause();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

      NSArray keys = NSArray.componentsSeparatedByString(keyPath, ".");
      EOEntity ent = entity();

      for (int i = 0; i < keys.count(); i++) {
        String k = (String) keys.objectAtIndex(i);
        EORelationship rel = ent.anyRelationshipNamed(k);
        if (rel == null) {
          // it may be an attribute
          if (ent.anyAttributeNamed(k) != null) {
            break;
          }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

      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.EOEntity.anyRelationshipNamed()

      NSArray<String> keys = NSArray.componentsSeparatedByString(keyPath, ".");
      EOEntity ent = entity();

      for (int i = 0; i < keys.count(); i++) {
        String k = keys.objectAtIndex(i);
        EORelationship rel = ent.anyRelationshipNamed(k);
        if (rel == null) {
          // it may be an attribute
          if (ent.anyAttributeNamed(k) != null) {
            break;
          }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

            ? 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;
        if(enableIdentifierQuoting()) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.anyRelationshipNamed()

        NSArray keys = NSArray.componentsSeparatedByString(keyPath, ".");
        EOEntity ent = entity();
       
        for (int i = 0; i < keys.count(); i++) {
            String k = (String)keys.objectAtIndex(i);
            EORelationship rel = ent.anyRelationshipNamed(k);
            if (rel == null) {
                // it may be an attribute
                if (ent.anyAttributeNamed(k) != null) {
                    break;
                }
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.