Package com.webobjects.eoaccess

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()


  protected boolean isInherited(EOAttribute attribute) {
    boolean inherited = false;
    EOEntity parentEntity = attribute.entity().parentEntity();
    while (!inherited && parentEntity != null) {
      inherited = (parentEntity.attributeNamed(attribute.name()) != null);
      parentEntity = parentEntity.parentEntity();
    }
    return inherited;
  }
View Full Code Here


  protected boolean isInherited(EOAttribute attribute) {
    boolean inherited = false;
    EOEntity parentEntity = attribute.entity().parentEntity();
    while (!inherited && parentEntity != null) {
      inherited = (parentEntity.attributeNamed(attribute.name()) != null);
      parentEntity = parentEntity.parentEntity();
    }
    return inherited;
  }
View Full Code Here

        EOEntity entity = modelGroup.entityNamed(entityName);
        EOAttribute selectedAttribute = null;
        if (relationshipKey() != null && entity.relationshipNamed(relationshipKey()) != null) {
            EORelationship relationship = entity.relationshipNamed(relationshipKey());
            EOEntity destinationEntity = relationship.destinationEntity();
            selectedAttribute = destinationEntity.attributeNamed(key);
        } else {
            selectedAttribute = entity.attributeNamed(key);
        }
        return selectedAttribute.className();
    }
View Full Code Here

                entity=EOModelGroup.defaultGroup().entityNamed(objectForPropertyDisplayed.entityName());
                lastKey=KeyValuePath.lastPropertyKeyInKeyPath(key);
            }
        }
        if (entity!=null && lastKey!=null) {
            Object property=entity.attributeNamed(lastKey);
            property=property==null ? entity.relationshipNamed(lastKey) : property;
            //BOOGIE
            EOAttribute a=entity.attributeNamed(lastKey);
            NSDictionary userInfo=null;
            if (a!=null) userInfo=a.userInfo();
View Full Code Here

        }
        if (entity!=null && lastKey!=null) {
            Object property=entity.attributeNamed(lastKey);
            property=property==null ? entity.relationshipNamed(lastKey) : property;
            //BOOGIE
            EOAttribute a=entity.attributeNamed(lastKey);
            NSDictionary userInfo=null;
            if (a!=null) userInfo=a.userInfo();
            else {
                EORelationship r=entity.relationshipNamed(lastKey);
                if (r!=null) userInfo=r.userInfo();
View Full Code Here

              String path = ERXStringUtilities.keyPathWithoutLastProperty(key);
              attributeName = ERXStringUtilities.lastPropertyKeyInKeyPath(key);
              entity = ERXEOAccessUtilities.destinationEntityForKeyPath(rootEntity, path);
            }
            if(entity != null) {
              attribute = entity.attributeNamed(attributeName);
              if(attribute != null) {
                String stringValue = context().request().stringFormValueForKey(key);
                if(stringValue != null) {
                  Object value = null;
                  NSSelector selector = EOKeyValueQualifier.QualifierOperatorEqual;
View Full Code Here

            } else if(s.indexOf(ATTRIBUTE_PREFIX) == 0) {
                int entityOffset = s.indexOf(ENTITY_PREFIX);
                String entityName = s.substring(entityOffset + ENTITY_PREFIX.length());
                String attributeName = s.substring(ATTRIBUTE_PREFIX.length(), entityOffset);
                EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
                o = entity.attributeNamed(attributeName);
            }
        }
        return o;
    }
View Full Code Here

      NSArray keys = (NSArray) NSKeyValueCoding.Utility.valueForKey(entity, "dbSnapshotKeys");
      NSDictionary dbSnapshot = dbOp.dbSnapshot();
      NSDictionary newRow = dbOp.newRow();
      for (int i = keys.count() - 1; i >= 0; i--) {
        String key = (String) keys.objectAtIndex(i);
        EOAttribute att = entity.attributeNamed(key);
        // FIX: ak when you have single-table inheritance and in the
        // child there are foreign keys that are not in the parent
        // THEN, if the entity _hasNonUpdateableAttributes (public PK or
        // read only props) the DB op is checked
        // against the attributes. BUT this dictionary has all entries,
View Full Code Here

                EORelationship relationship = d2wContext.relationship();
                if (relationship != null && !(value instanceof EOEnterpriseObject)) {
                    String keyWhenRelationship = (String)d2wContext.valueForKey("keyWhenRelationship");
                    if (keyWhenRelationship != null) {
                        EOEntity destinationEntity = relationship.destinationEntity();
                        attribute = destinationEntity.attributeNamed(keyWhenRelationship);
                    }
                }
            }

            if (attribute != null) {
View Full Code Here

                lastEO=rawLastEO instanceof EOEnterpriseObject ? (EOEnterpriseObject)rawLastEO : null;
            }
            if (lastEO!=null) {
                EOEntity entity=EOModelGroup.defaultGroup().entityNamed(lastEO.entityName());
                String lastKey=KeyValuePath.lastPropertyKeyInKeyPath(propertyKey);
                result=entity.attributeNamed(lastKey);
            }
        }
        if (result==null) {
            // default to the basic attribute if the above didnt' work
            if (propertyKey!=null) result=c.attribute();
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.