Examples of sourceAttribute()


Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

                                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());
                                    EOKeyValueQualifier qualifier = new EOKeyValueQualifier(join.destinationAttribute().name(), EOQualifier.QualifierOperatorEqual, pkValue);
                                    qualifiers.addObject(qualifier);
                                }
                                fs.setQualifier(qualifiers.count() == 1 ? qualifiers.lastObject() : new EOAndQualifier(qualifiers));
                                value = ec.objectsWithFetchSpecification(fs);
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

        for( int i = 0; i < joinsCount; i++ ) {
            EOJoin currentJoin = joins.objectAtIndex(i);
            String left;
            String right;
            if(enableIdentifierQuoting()) {
                left = leftAlias +"."+ sqlStringForSchemaObjectName(currentJoin.sourceAttribute().columnName());
                right =  rightAlias +"."+ sqlStringForSchemaObjectName(currentJoin.destinationAttribute().columnName());
            } else {
                left = leftAlias +"."+currentJoin.sourceAttribute().columnName();
                right = rightAlias +"."+currentJoin.destinationAttribute().columnName();
            }
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

            String right;
            if(enableIdentifierQuoting()) {
                left = leftAlias +"."+ sqlStringForSchemaObjectName(currentJoin.sourceAttribute().columnName());
                right =  rightAlias +"."+ sqlStringForSchemaObjectName(currentJoin.destinationAttribute().columnName());
            } else {
                left = leftAlias +"."+currentJoin.sourceAttribute().columnName();
                right = rightAlias +"."+currentJoin.destinationAttribute().columnName();
            }
            joinStrings.addObject( left + " = " + right);
        }
        jc.joinCondition = " ON " + joinStrings.componentsJoinedByString( " AND " );
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

     * @return source attribute for the relationship
     */
    public static EOAttribute sourceAttributeForRelationship(EORelationship relationship)
    {
        EOJoin join = relationship.joins().objectAtIndex(0);
        return join.sourceAttribute();
    }

    /**
     * Returns the external column name for the source attribute for the relationship named relationshipName on entity.  Assumes there is only one join.
     * This is intend to support the *RowsDescribedByQualifier methods when used with relationships.
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

                NSArray<String> definitionKeys=NSArray.componentsSeparatedByString(definitionKeyPath,".");
                EOEntity lastStopEntity=targetRelationship.entity();
                EORelationship firstHopRelationship= lastStopEntity.relationshipNamed(definitionKeys.objectAtIndex(0));
                EOEntity endOfFirstHopEntity= firstHopRelationship.destinationEntity();
                EOJoin join= firstHopRelationship.joins().objectAtIndex(0); // assumes 1 join
                EOAttribute sourceAttribute=join.sourceAttribute();
                EOAttribute targetAttribute=join.destinationAttribute();
                EORelationship secondHopRelationship=endOfFirstHopEntity.relationshipNamed(definitionKeys.objectAtIndex(1));
                join= secondHopRelationship.joins().objectAtIndex(0); // assumes 1 join
                EOAttribute secondHopSourceAttribute=join.sourceAttribute();
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

                EOJoin join= firstHopRelationship.joins().objectAtIndex(0); // assumes 1 join
                EOAttribute sourceAttribute=join.sourceAttribute();
                EOAttribute targetAttribute=join.destinationAttribute();
                EORelationship secondHopRelationship=endOfFirstHopEntity.relationshipNamed(definitionKeys.objectAtIndex(1));
                join= secondHopRelationship.joins().objectAtIndex(0); // assumes 1 join
                EOAttribute secondHopSourceAttribute=join.sourceAttribute();

                NSMutableArray<String> lastStopPKeyPath = toManyKeys.mutableClone();
                lastStopPKeyPath.removeLastObject();
                lastStopPKeyPath.addObject(firstHopRelationship.name());
                lastStopPKeyPath.addObject(targetAttribute.name());
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

      NSArray joins = r.joins();
      int joinsCount = joins.count();
      NSMutableArray joinStrings = new NSMutableArray(joinsCount);
      for (int i = 0; i < joinsCount; i++) {
        EOJoin currentJoin = (EOJoin) joins.objectAtIndex(i);
        String left = leftAlias + "." + sqlStringForSchemaObjectName(currentJoin.sourceAttribute().columnName());
        String right = rightAlias + "." + sqlStringForSchemaObjectName(currentJoin.destinationAttribute().columnName());
        joinStrings.addObject(left + " = " + right);
      }
      jc.joinCondition = " ON " + joinStrings.componentsJoinedByString(" AND ");
      if (!_alreadyJoined.containsObject(jc)) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

      for (int i = 0; i < joinsCount; i++) {
        EOJoin currentJoin = joins.objectAtIndex(i);
        String left;
        String right;
        if (CONFIG.ENABLE_IDENTIFIER_QUOTING) {
          left = leftAlias + "." + sqlStringForSchemaObjectName(currentJoin.sourceAttribute().columnName());
          right = rightAlias + "." + sqlStringForSchemaObjectName(currentJoin.destinationAttribute().columnName());
        } else {
          left = leftAlias + "." + currentJoin.sourceAttribute().columnName();
          right = rightAlias + "." + currentJoin.destinationAttribute().columnName();
        }
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

        String right;
        if (CONFIG.ENABLE_IDENTIFIER_QUOTING) {
          left = leftAlias + "." + sqlStringForSchemaObjectName(currentJoin.sourceAttribute().columnName());
          right = rightAlias + "." + sqlStringForSchemaObjectName(currentJoin.destinationAttribute().columnName());
        } else {
          left = leftAlias + "." + currentJoin.sourceAttribute().columnName();
          right = rightAlias + "." + currentJoin.destinationAttribute().columnName();
        }
        joinStrings.addObject(left + " = " + right);
      }
      String joinCondition = " ON " + joinStrings.componentsJoinedByString(" AND ");
View Full Code Here

Examples of com.webobjects.eoaccess.EOJoin.sourceAttribute()

        for( int i = 0; i < joinsCount; i++ ) {
            EOJoin currentJoin = joins.objectAtIndex(i);
            String left;
            String right;
            if(enableIdentifierQuoting()) {
                left = leftAlias +"."+ sqlStringForSchemaObjectName(currentJoin.sourceAttribute().columnName());
                right =  rightAlias +"."+ sqlStringForSchemaObjectName(currentJoin.destinationAttribute().columnName());
            } else {
                left = leftAlias +"."+currentJoin.sourceAttribute().columnName();
                right = rightAlias +"."+currentJoin.destinationAttribute().columnName();
            }
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.