Examples of EORelationship


Examples of com.webobjects.eoaccess.EORelationship

  NSArray myattributes = attributes().immutableClone();
  for ( Enumeration e = myattributes.objectEnumerator(); e.hasMoreElements();) {
      GSVAttribute attribute = (GSVAttribute)e.nextElement();
      //NSLog.debug.appendln("checking attribute"+eoentity.name()+"."+attribute.name());
      EOAttribute a = eoentity.attributeNamed(attribute.name());
      EORelationship p = eoentity.relationshipNamed(attribute.name());
     
      if (a == null) {
    NSLog.out.appendln("attribute "+attribute.name() + " does not exist in entity " + name() + " (anymore?), deleted from Valididy model");
    removeAttribute(attribute);
      } else if (p != null) {
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship

        String restrictedChoiceKey=(String)d2wContext().valueForKey("restrictedChoiceKey");
        if( restrictedChoiceKey!=null && restrictedChoiceKey.length()>0 )
            return valueForKeyPath(restrictedChoiceKey);
        String fetchSpecName=(String)d2wContext().valueForKey("restrictingFetchSpecification");
        if(fetchSpecName != null) {
            EORelationship relationship = ERXUtilities.relationshipWithObjectAndKeyPath(object(), (String)d2wContext().valueForKey("propertyKey"));
            if(relationship != null)
                return EOUtilities.objectsWithFetchSpecificationAndBindings(object().editingContext(), relationship.destinationEntity().name(),fetchSpecName,null);
        }
        return null;
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship

        super(context);
    }

    public Format valueFormatter() {
        Format f = null;
        EORelationship rel = (EORelationship) valueForKeyPath("d2wContext.smartRelationship");
        EOEntity destEnt = rel.destinationEntity();
        EOAttribute searchAttr = destEnt.attributeNamed(keyWhenRelationship());
        if(searchAttr != null) {
            String className = searchAttr.className();
            if(className.equals("java.lang.Number"))
                f = new NSNumberFormatter("0");
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship

            return valueForKeyPath(restrictedChoiceKey);
        String fetchSpecName=(String)d2wContext().valueForKey("restrictingFetchSpecification");
        if(fetchSpecName != null) {
            EOEditingContext ec = ERXEC.newEditingContext();
            EOEntity entity = d2wContext().entity();
            EORelationship relationship = entity.relationshipNamed((String)d2wContext().valueForKey("propertyKey"));
            return EOUtilities.objectsWithFetchSpecificationAndBindings(ec, relationship.destinationEntity().name(),fetchSpecName,null);
        }
        return null;
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship

        }
        String fetchSpecName = (String) d2wContext().valueForKey("restrictingFetchSpecification");
        if (fetchSpecName != null) {
            EOEditingContext ec = ERXEC.newEditingContext();
            EOEntity entity = d2wContext().entity();
            EORelationship relationship = entity.relationshipNamed((String) d2wContext().valueForKey("propertyKey"));
            ec.lock();
            try {
                return EOUtilities.objectsWithFetchSpecificationAndBindings(ec,
                        relationship.destinationEntity().name(), fetchSpecName, null);
            } finally {
                ec.unlock();
            }
        }
        return null;
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship

        String relationshipKey = (String) a.objectAtIndex(1);
        if (masterObject != null
                && !ERXStringUtilities.stringIsNullOrEmpty(relationshipKey)) {
            EOEntity masterEntity = EOUtilities.entityForObject(
                    masterObject.editingContext(), masterObject);
            EORelationship rel = masterEntity.relationshipNamed(relationshipKey);
            // set currentRelationship key to allow unique ID creation
            // (wonder-140)
            d2wContext().takeValueForKey(rel, "currentRelationship");
        }
        setMasterObjectAndRelationshipKey(masterObject, relationshipKey);
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship

          else {
            Utility.modelCopyAttribute(source, copy, attribute);
          }
        }
        else {
          EORelationship relationship = (EORelationship) property;
          Utility.modelCopyRelationship(copiedObjects, source, copy, relationship);
        }
      }
      return copy;
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EORelationship

        @SuppressWarnings("unchecked")
        NSDictionary<String, Object> userInfo = attribute.userInfo();
        copyType = Utility.copyType(attribute, userInfo);
      }
      else {
        EORelationship relationship = (EORelationship) property;
        NSDictionary<String, Object> userInfo = relationship.userInfo();
        copyType = Utility.copyType(relationship, userInfo);
      }
      return copyType;
    }
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EORelationship

    if (ComparisonUtils.equals(selection, getSelection())) {
      return;
    }
   
    super.setInput(part, selection);
    EORelationship relationship = null;
    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    if (selectedObject instanceof EORelationship) {
      relationship = (EORelationship) selectedObject;
    } else if (selectedObject instanceof EORelationshipPath) {
      relationship = ((EORelationshipPath) selectedObject).getChildRelationship();
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EORelationship

        ErrorUtils.openErrorDialog(Display.getDefault().getActiveShell(), e);
      }
    }

    protected void doubleSelectionOccurred(ISelection _selection) {
      EORelationship relationship = (EORelationship) ((IStructuredSelection) _selection).getFirstElement();
      EOModelObject jumpToModelObject = null;
      EORelationship inverseRelationship = relationship.getInverseRelationship();
      if (inverseRelationship != null) {
        jumpToModelObject = inverseRelationship;
      } else {
        EOEntity destination = relationship.getDestination();
        jumpToModelObject = destination;
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.