Examples of destinationEntity()


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

            for (Enumeration relationshipEnum = entity.relationships().objectEnumerator(); relationshipEnum.hasMoreElements();) {
                EORelationship relationship = (EORelationship) relationshipEnum.nextElement();

                if (hasForeignKeyConstraint(relationship)) {
                    EOEntity destinationEntity = relationship.destinationEntity();
                    logger.trace("Recording dependency on " + destinationEntity.name());
                    entitiesDependentOn(dependencyList, destinationEntity).addObject(entity.name());
                }
                else {
                    logger.trace("Ignoring, is not FK relationship or vertical inheritance parent");
View Full Code Here

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

            EORelationship relationship = (EORelationship)relationshipEnumerator.nextElement();
            if( ! relationship.isFlattened() ) {
              NSArray destinationAttributes = relationship.destinationAttributes();
             
              // First exclude all the destination entity primary keys
              for (Enumeration attributeEnumerator = relationship.destinationEntity().primaryKeyAttributes().objectEnumerator(); attributeEnumerator.hasMoreElements(); ) {
                EOAttribute attribute = (EOAttribute)attributeEnumerator.nextElement();
                columnNameDictionary.setObjectForKey(attribute.columnName(), relationship.destinationEntity().externalName() + "." + attribute.columnName());
              }
              // Then deal with our end of things
              for (Enumeration attributeEnumerator = relationship.sourceAttributes().objectEnumerator(); attributeEnumerator.hasMoreElements(); ) {
View Full Code Here

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

              NSArray destinationAttributes = relationship.destinationAttributes();
             
              // First exclude all the destination entity primary keys
              for (Enumeration attributeEnumerator = relationship.destinationEntity().primaryKeyAttributes().objectEnumerator(); attributeEnumerator.hasMoreElements(); ) {
                EOAttribute attribute = (EOAttribute)attributeEnumerator.nextElement();
                columnNameDictionary.setObjectForKey(attribute.columnName(), relationship.destinationEntity().externalName() + "." + attribute.columnName());
              }
              // Then deal with our end of things
              for (Enumeration attributeEnumerator = relationship.sourceAttributes().objectEnumerator(); attributeEnumerator.hasMoreElements(); ) {
                EOAttribute attribute = (EOAttribute)attributeEnumerator.nextElement();
                if( (! this.isSinglePrimaryKeyAttribute(attribute)) && (columnNameDictionary.objectForKey(tableName + "." + attribute.columnName()) != null) ) {
View Full Code Here

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

                  EOSQLExpression expression = this._expressionForString("create index " + tableName + " " + attribute.columnName());
                  if(expression != null) primaryKeyConstraintExpressions.addObject( expression );
                }
              }
              // Then deal with the other side
              if(entity.model() == relationship.destinationEntity().model()) {
                for (Enumeration attributeEnumerator = relationship.destinationAttributes().objectEnumerator(); attributeEnumerator.hasMoreElements(); ) {
                  EOAttribute attribute = (EOAttribute)attributeEnumerator.nextElement();
                  String destinationTableName = relationship.destinationEntity().externalName();
                  if( (destinationTableName != null) && ( ! "".equals(destinationTableName) ) ) {
                    if( (! this.isSinglePrimaryKeyAttribute(attribute)) && (columnNameDictionary.objectForKey(destinationTableName + "." + attribute.columnName()) != null) ) {
View Full Code Here

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

              }
              // Then deal with the other side
              if(entity.model() == relationship.destinationEntity().model()) {
                for (Enumeration attributeEnumerator = relationship.destinationAttributes().objectEnumerator(); attributeEnumerator.hasMoreElements(); ) {
                  EOAttribute attribute = (EOAttribute)attributeEnumerator.nextElement();
                  String destinationTableName = relationship.destinationEntity().externalName();
                  if( (destinationTableName != null) && ( ! "".equals(destinationTableName) ) ) {
                    if( (! this.isSinglePrimaryKeyAttribute(attribute)) && (columnNameDictionary.objectForKey(destinationTableName + "." + attribute.columnName()) != null) ) {
                      columnNameDictionary.setObjectForKey(attribute.columnName(), destinationTableName + "." + attribute.columnName());
                      EOSQLExpression expression = this._expressionForString("create index " + destinationTableName + " " + attribute.columnName());
                      if(expression != null) primaryKeyConstraintExpressions.addObject( expression );
View Full Code Here

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

      int dotIndex = relationshipKey.indexOf(".");
      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);
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()

      int dotIndex = relationshipKey.indexOf(".");
      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;
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()

        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
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.