Examples of destinationEntity()


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

                        if (rel != null) {
                            if (rel.isFlattened()) {
                                throw new IllegalStateException("Can't handle flattened relations, use the definition: " + rel);
                            }
                            if (rel.isToMany()) {
                                EOEntity destinationEntity = rel.destinationEntity();
                                Configuration destinationConfiguration = configureEntity(destinationEntity);
                                String inverseName = rel.anyInverseRelationship().name();
                                destinationConfiguration.notificationKeys.addObject(inverseName);
                                source = rel.destinationEntity();
                            } else {
View Full Code Here

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

                            if (rel.isToMany()) {
                                EOEntity destinationEntity = rel.destinationEntity();
                                Configuration destinationConfiguration = configureEntity(destinationEntity);
                                String inverseName = rel.anyInverseRelationship().name();
                                destinationConfiguration.notificationKeys.addObject(inverseName);
                                source = rel.destinationEntity();
                            } else {
                                config.keys.addObject(rel.name());
                            }
                        }
                    }
View Full Code Here

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

              _buildDependenciesForModel(parentModel, LATEST_VERSION, versions, migrations);
            }
            Enumeration relationshipsEnum = entity.relationships().objectEnumerator();
            while (relationshipsEnum.hasMoreElements()) {
              EORelationship relationship = (EORelationship) relationshipsEnum.nextElement();
              EOEntity destinationEntity = relationship.destinationEntity();
              if (destinationEntity != null && !destinationEntity.model().equals(model)) {
                EOModel destinationModel = destinationEntity.model();
                _buildDependenciesForModel(destinationModel, LATEST_VERSION, versions, migrations);
              }
            }
View Full Code Here

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

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

            if (targetRelationship.joins()==null || targetRelationship.joins().isEmpty()) {
View Full Code Here

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

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

            if (targetRelationship.joins()==null || targetRelationship.joins().isEmpty()) {
                // we have a flattened many to many
                String definitionKeyPath=targetRelationship.definition();                       
                NSArray<String> definitionKeys=NSArray.componentsSeparatedByString(definitionKeyPath,".");
View Full Code Here

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

                // 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
                EOAttribute sourceAttribute=join.sourceAttribute();
                EOAttribute targetAttribute=join.destinationAttribute();
                EORelationship secondHopRelationship=endOfFirstHopEntity.relationshipNamed(definitionKeys.objectAtIndex(1));
                join= secondHopRelationship.joins().objectAtIndex(0); // assumes 1 join
View Full Code Here

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

            if (baseKeyPath != null) {
                for (String path : NSArray.componentsSeparatedByString(baseKeyPath, ".")) {
                    if (null == relationship) {
                        relationship = baseEntity.anyRelationshipNamed(path);
                    } else {
                        relationship = relationship.destinationEntity().anyRelationshipNamed(path);
                    }
                }
            }

            EOEntity srcEntity = relationship != null ? relationship.entity() : baseEntity;
View Full Code Here

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

                    }
                }
            }

            EOEntity srcEntity = relationship != null ? relationship.entity() : baseEntity;
            EOEntity destEntity = relationship != null ? relationship.destinationEntity() : baseEntity;

            // We need to do a bunch of hand-waiving to get the right table aliases for the table used in the exists
            // subquery and for the join clause back to the source table.
            String sourceTableAlias = "t0"; // The alias for the the source table of the baseKeyPath from the main query.
            String destTableAlias; // The alias for the table used in the subquery.
View Full Code Here

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

                rel = entity.anyRelationshipNamed(pieces.objectAtIndex(i));
                if (null == rel) {
                    return null;
                }
                path.addObject(rel);
                entity = rel.destinationEntity();
            }

            String key = pieces.lastObject();
            if (entity.anyRelationshipNamed(key) != null) { // Test first for a relationship.
                rel = entity.anyRelationshipNamed(key);
View Full Code Here

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

                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);
                }
                att = rel.destinationAttributes().lastObject();
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.