Package com.webobjects.eoaccess

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


            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();
            }
            //
           // NSDictionary userInfo=(NSDictionary)(property!=null ? property.valueForKey("userInfo") : null);
            result= (String)(userInfo!=null ? userInfo.valueForKey("unit") : null);
        }
View Full Code Here


            for( Enumeration e = entity.relationships().objectEnumerator(); e.hasMoreElements();) {
                EORelationship rel = (EORelationship)e.nextElement();
                String defaultValue = null;

                if(rel.userInfo() != null)
                    defaultValue = (String)rel.userInfo().objectForKey(defaultKey);

                if(defaultValue == null && entityInfo != null) {
                    defaultValue = (String)entityInfo.objectForKey(rel.name());
                }
View Full Code Here

            for( Enumeration e = entity.relationships().objectEnumerator(); e.hasMoreElements();) {
                EORelationship rel = (EORelationship)e.nextElement();
                String defaultValue = null;

                if(rel.userInfo() != null)
                    defaultValue = (String)rel.userInfo().objectForKey(defaultKey);

                if(defaultValue == null && entityInfo != null) {
                    defaultValue = (String)entityInfo.objectForKey(rel.name());
                }
                if(defaultValue != null)
View Full Code Here

    @Override
    public String inverseForRelationshipKey(String relationshipKey) {
        String result = null;
        EORelationship relationship = entity().relationshipNamed(relationshipKey);
        if(relationship != null && relationship.userInfo() != null) {
            result = (String) relationship.userInfo().objectForKey("ERXInverseRelationshipName");
        }
        if(result == null) {
            result = super.inverseForRelationshipKey(relationshipKey);
        }
View Full Code Here

    @Override
    public String inverseForRelationshipKey(String relationshipKey) {
        String result = null;
        EORelationship relationship = entity().relationshipNamed(relationshipKey);
        if(relationship != null && relationship.userInfo() != null) {
            result = (String) relationship.userInfo().objectForKey("ERXInverseRelationshipName");
        }
        if(result == null) {
            result = super.inverseForRelationshipKey(relationshipKey);
        }
        return result;
View Full Code Here

            joinRelationships = entity.relationships();
        } else {
            NSMutableArray relationshipCache = new NSMutableArray();
            for (Enumeration e = entity.relationships().objectEnumerator(); e.hasMoreElements();) {
                EORelationship relationship = (EORelationship)e.nextElement();
                if (relationship.userInfo() != null
                    && ERXValueUtilities.booleanValue(relationship.userInfo().objectForKey(SortedJoinRelationshipUserInfoKey))) {
                    relationshipCache.addObject(relationship);
                }
            }
            if (relationshipCache.count() != 2)
View Full Code Here

        } else {
            NSMutableArray relationshipCache = new NSMutableArray();
            for (Enumeration e = entity.relationships().objectEnumerator(); e.hasMoreElements();) {
                EORelationship relationship = (EORelationship)e.nextElement();
                if (relationship.userInfo() != null
                    && ERXValueUtilities.booleanValue(relationship.userInfo().objectForKey(SortedJoinRelationshipUserInfoKey))) {
                    relationshipCache.addObject(relationship);
                }
            }
            if (relationshipCache.count() != 2)
                throw new RuntimeException("Did not find two relationships with user info entries: " +
View Full Code Here

        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

            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();
            }
            result= (String)(userInfo!=null ? userInfo.valueForKey("unit") : null);
        }
        return result;
    }
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.