Examples of valueForKeyPath()


Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

            if(PropertyKeyWithoutLastProperty!=null){
                objectForPropertyDisplayed = object!=null ? (EOEnterpriseObject)object.valueForKeyPath(PropertyKeyWithoutLastProperty) : null;
            }else{
                objectForPropertyDisplayed = object;
            }
            userInfoUnitString = objectForPropertyDisplayed!=null ? (String)objectForPropertyDisplayed.valueForKeyPath(keyPath) : null;
        }
        return userInfoUnitString;
    }

    /**
 
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

            if(page != null && true) {
                eo = (EOEnterpriseObject)page.valueForKey("object");
                eo.editingContext().lock();
                int dotOffset = key.lastIndexOf('.');
                if(dotOffset > 0) {
                    Object otherEO = eo.valueForKeyPath(key.substring(0, dotOffset));
                    if(otherEO != null) {
                        NSValidation.Utility.validateValueForKey(otherEO, value, key.substring(dotOffset+1));
                    }
                } else {
                    eo.validateValueForKey(value, key);
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

        if (c.wasFormSubmitted()) {
          Object realSource = realSourceObject();
          if(realSource instanceof EOEnterpriseObject) {
              EOEnterpriseObject localObject = (EOEnterpriseObject)realSource;
              String realRelationshipKey = realRelationshipKey();
              Object value = localObject.valueForKeyPath(realRelationshipKey);
              try {
                  localObject.validateValueForKey(value, realRelationshipKey);
              } catch (NSValidation.ValidationException eov) {
                  parent().validationFailedWithException(eov, value, relationshipKey());
              }
View Full Code Here

Examples of com.webobjects.foundation.NSArray.valueForKeyPath()

            sql = "";
            try {
                EOAdaptor adaptor = EOAdaptor.adaptorWithModel(model);
                EOSchemaGeneration synchronizationFactory = adaptor.synchronizationFactory();
                NSArray array = synchronizationFactory.createTableStatementsForEntityGroup(new NSArray(selectedEntity));
                sql =  ((NSArray)array.valueForKeyPath("statement")).componentsJoinedByString(";\n");
            } catch(Exception ex) {
                sql = "" + ex;
            }
            return null;
        }
View Full Code Here

Examples of com.webobjects.foundation.NSArray.valueForKeyPath()

        setDateModified(new NSTimestamp());
    }

    public NSArray commentsByDate() {
        NSArray comments = comments();
        comments = (NSArray) comments.valueForKeyPath("@sortAsc." + Comment.Key.DATE_SUBMITTED);
        return comments;
    }

    private Comment firstComment() {
        return (Comment) commentsByDate().objectAtIndex(0);
View Full Code Here

Examples of com.webobjects.foundation.NSMutableArray.valueForKeyPath()

        }
        public NSArray attributesUsedInRelationships() {
            if(attributesUsedInRelationships == null) {
                NSMutableArray array = new NSMutableArray((NSArray)valueForKeyPath("model.entities.relationships.joins.sourceAttribute"));
                array.addObject(valueForKeyPath("model.entities.relationships.joins.destinationAttribute"));
                attributesUsedInRelationships = (NSArray)array.valueForKeyPath("@flatten");
            }
            return attributesUsedInRelationships;
        }
        public boolean attributeHasRelationships() {
            return attributesUsedInRelationships().containsObject(attribute);
View Full Code Here

Examples of com.webobjects.foundation.NSMutableArray.valueForKeyPath()

        Component p = this;
        while(p != null) {
            array.addObject(p.textDescription());
            p = p.parent();
        }
        return array.valueForKeyPath("@reverse.toString").toString();
  }

    public int level() {
    return level(0);
  }
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary.valueForKeyPath()

            // AK: this occurs mostly when we want to load a rule that contains an assigment class which can't be found
            //HACK cheesy way to get at the encoded rule dictionary
            NSMutableDictionary dict = (NSMutableDictionary)NSKeyValueCoding.Utility.valueForKey(eokeyvalueunarchiver,"propertyList");
            String ruleString = dict.toString();
            // now store the old assignment class
            dict.takeValueForKeyPath(dict.valueForKeyPath("rhs.class"), "assignmentClassName");
            // and push in the default class
            dict.takeValueForKeyPath(Assignment.class.getName(), "rhs.class");
            // try again
            try {
                rule = new ERD2WRule(eokeyvalueunarchiver);
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary.valueForKeyPath()

        try {
            rule = new ERD2WExtendedRule(eokeyvalueunarchiver);
        } catch(Throwable t) {
            NSMutableDictionary dict = (NSMutableDictionary)NSKeyValueCoding.Utility.valueForKey(eokeyvalueunarchiver,"propertyList");
            log.info("Problems with this rule: " + dict + "," + t.getMessage());
            dict.takeValueForKeyPath(dict.valueForKeyPath("rhs.class"), "assignmentClassName");
            dict.takeValueForKeyPath("com.webobjects.directtoweb.Assignment", "rhs.class");
            rule = new ERD2WExtendedRule(eokeyvalueunarchiver);
        }
        return rule;
    }
View Full Code Here

Examples of er.extensions.eof.ERXGenericRecord.valueForKeyPath()

        handleChange(ec, target, ERCAuditTrailType.ADDED, keyPath, null, serializeObject(eo));
    }

    protected void handleUpdate(EOEditingContext ec, EOEnterpriseObject target, String keyPath, EOEnterpriseObject eo) {
        ERXGenericRecord rec = (ERXGenericRecord) target;
        EOEnterpriseObject oldValue = (EOEnterpriseObject) rec.valueForKeyPath(keyPath);
        handleChange(ec, target, ERCAuditTrailType.UPDATED, keyPath, oldValue, oldValue);
    }

    protected void handleChange(EOEditingContext ec, EOEnterpriseObject eo, ERCAuditTrailType type, String keyPath, Object oldValue, Object newValue) {
        ERXGenericRecord rec = (ERXGenericRecord) eo;
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.