Package com.webobjects.eoaccess

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


            // FIXME this list should be shared with all other JSTwoLevel.. sharing the same sourceEntityName!
            String entityName=(String)valueForBinding("sourceEntityName");
            EOEditingContext ec=((EOEnterpriseObject)valueForBinding("sourceObject")).editingContext();
            EOEntity sourceEntity=EOUtilities.entityNamed(ec,entityName);
            EORelationship r1=sourceEntity.relationshipNamed((String)valueForBinding("relationshipKey"));
            EOEntity childEntity=r1.destinationEntity();
            EORelationship r2= childEntity.relationshipNamed((String)valueForBinding("restrictingRelationshipKey"));
            EOEntity parentEntity=r2.destinationEntity();
            NSArray unsortedList=EOUtilities.objectsForEntityNamed(ec,parentEntity.name());
            EOSortOrdering sortOrdering=new EOSortOrdering((String)valueForBinding("restrictingRelationshipSortKey"),
                                                           EOSortOrdering.CompareAscending);
View Full Code Here

            EOEditingContext ec=((EOEnterpriseObject)valueForBinding("sourceObject")).editingContext();
            EOEntity sourceEntity=EOUtilities.entityNamed(ec,entityName);
            EORelationship r1=sourceEntity.relationshipNamed((String)valueForBinding("relationshipKey"));
            EOEntity childEntity=r1.destinationEntity();
            EORelationship r2= childEntity.relationshipNamed((String)valueForBinding("restrictingRelationshipKey"));
            EOEntity parentEntity=r2.destinationEntity();
            NSArray unsortedList=EOUtilities.objectsForEntityNamed(ec,parentEntity.name());
            EOSortOrdering sortOrdering=new EOSortOrdering((String)valueForBinding("restrictingRelationshipSortKey"),
                                                           EOSortOrdering.CompareAscending);
            NSMutableArray sortArray=new NSMutableArray(sortOrdering);
            String secondarySortKey=(String)valueForBinding("restrictingSecondarySortKey");
View Full Code Here

                EOEntity destinationEntity = null;
               
                if(_source instanceof EOEnterpriseObject) {
                    EORelationship relationship = ERXUtilities.relationshipWithObjectAndKeyPath((EOEnterpriseObject)_source, relationshipKey());
                   
                    destinationEntity = relationship != null ? relationship.destinationEntity() : null;
                } else {
                    String anEntityName = sourceEntityName();
                    if(anEntityName != null) {
                        EOEntity anEntity = ERXEOAccessUtilities.entityNamed(ec, anEntityName);
                        if (anEntity == null) {
View Full Code Here

            String key = ERXStringUtilities.firstPropertyKeyInKeyPath(keyPath);
            EORelationship rel = srcentity.relationshipNamed(key);
            if (rel == null) {
                break;
            }
            srcentity = rel.destinationEntity();
            keyPath = ERXStringUtilities.keyPathWithoutFirstProperty(keyPath);
        }
        NSDictionary d = new NSDictionary(new Object[]{srcentity, keyPath}, new Object[]{"entity", "keyPath"});
        return d;
    }
View Full Code Here

                  cnt += array.count();
                }
              }
              markEnd("ToMany.Fetching", source, key);
              if(batchLog.isDebugEnabled()) {
                batchLog.debug("Fetched " + cnt + " to-many " + relationship.destinationEntity().name() + " from " + eos.count() " " + source.entityName() + " for " + key);
              }
              return EOFaultHandler.isFault(obj);
            }
          }
        }
View Full Code Here

              markStart("ToOne.Fetching", source, key);
              doFetch(dbc, ec, relationship, eos);
              freshenFetchTimestamps(faults.allObjects(), timestamp);
              markEnd("ToOne.Fetching", source, key);
              if(batchLog.isDebugEnabled()) {
                batchLog.debug("Fetched " + faults.count() + " to-one " + relationship.destinationEntity().name() + " from " + eos.count() " " + source.entityName() + " for " + key);
              }
              return EOFaultHandler.isFault(eo);
            }
          }
        }
View Full Code Here

            return valueForKeyPath(restrictedChoiceKey);
        String fetchSpecName = stringValueForBinding(Keys.restrictingFetchSpecification);
        if(fetchSpecName != null) {
            EORelationship relationship = ERXUtilities.relationshipWithObjectAndKeyPath(object(),
                                                                                        (String)d2wContext().valueForKey(Keys.propertyKey));
            return EOUtilities.objectsWithFetchSpecificationAndBindings(object().editingContext(), relationship.destinationEntity().name(),fetchSpecName,null);
        }
        return null;
    }
   
  public String newButtonClass() {
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.