Package com.webobjects.eoaccess

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


          Results<T> filter = (Results<T>) primaryKeyReference(db, (Collection<? extends Number>) values);
         
          return new EvaluatingFilter<T>(filter, entity, qualifier);
        }
        if (rel != null
            && ! RelationshipStore.shouldBeStoredAsRelationship(rel.entity())
            && ! RelationshipStore.shouldBeStoredAsRelationship(rel.destinationEntity()) ) {
          // it's using foreign key
          Results<T> filter = (Results<T>) foreignKeyReference(db, rel, (Collection<? extends Number>) values);
         
          return new EvaluatingFilter<T>(filter, entity, qualifier);
View Full Code Here


          while (relationshipsEnum.hasMoreElements()) {
            EORelationship relationship = (EORelationship) relationshipsEnum.nextElement();
            if (!relationship.isToMany()) {
              EORelationship inverseRelationship = relationship.inverseRelationship();
              if (inverseRelationship != null && inverseRelationship.isToMany()) {
                EOEntity destEntity = inverseRelationship.entity();
                NSDictionary destPK = relationship._foreignKeyForSourceRow(snapshot);
                EOGlobalID destGID = destEntity.globalIDForRow(destPK);
                if (destGID != null) {
                  processRelationship(database, gid, relationship, destGID, inverseRelationship, context, settings);
                }
View Full Code Here

            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
                EOAttribute sourceAttribute=join.sourceAttribute();
                EOAttribute targetAttribute=join.destinationAttribute();
View Full Code Here

                        relationship = relationship.destinationEntity().anyRelationshipNamed(path);
                    }
                }
            }

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