Package com.webobjects.eoaccess

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


      String key = splits.get(i);
      EORelationship rel = currentEntity.relationshipNamed(key);
     
      if (rel != null) {       
        if (rel.isFlattened()) {
          String [] newDefinition = DOT_PATTERN.split(rel.definition());
         
          // perform replacement
          splits.remove(i);
         
          for (int j=0; j<newDefinition.length; j++) {
View Full Code Here


            String key = ERXStringUtilities.firstPropertyKeyInKeyPath(keyPath);
            String rest = ERXStringUtilities.keyPathWithoutFirstProperty(keyPath);
            EORelationship rel = source._relationshipForPath(key);
            if (rel != null) {
                if (rel.isFlattened()) {
                    ConfigurationEntry c = configureKeyPath(config, rel.definition() + (rest != null ? "." + rest : ""), source);
                    return c;
                }
                EOEntity destinationEntity = rel.destinationEntity();

                ConfigurationEntry destinationConfiguration;
View Full Code Here

            EORelationship relationship = entity.anyRelationshipNamed(part);
            if(relationship == null) {
                throw new IllegalArgumentException("Last element is not an attribute nor a relationship: " + keyPath);
            }
            if (relationship.isFlattened()) {
              NSArray<EOProperty> path = attributePathForKeyPath(entity, relationship.definition());
              result.addObjectsFromArray(path);
              return result;
            }
            attribute = relationship.joins().lastObject().sourceAttribute();
         }
View Full Code Here

      NSMutableArray<EOProperty> classProperties = sourceEntity.classProperties().mutableClone();
      classProperties.addObject(relationship);
      sourceEntity.setClassProperties(classProperties);
    }
    if(log.isDebugEnabled())
        log.debug(relationship + ", flattened:" + relationship.isFlattened() + ", definition:" + relationship.definition() + ", relationshipPath:" + relationship.relationshipPath());
    return relationship;
  }

    /**
     * Executes the given database context operation within a database context lock, retrying up to maxRetryCount times if the database connection dropped.
View Full Code Here

            targetRelationship=targetEntity.relationshipNamed(toManyKeys.lastObject());
            targetEntity=targetRelationship.destinationEntity();

            if (targetRelationship.joins()==null || targetRelationship.joins().isEmpty()) {
                // we have a flattened many to many
                String definitionKeyPath=targetRelationship.definition();                       
                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
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.