Package com.webobjects.eoaccess

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


  protected void preloadERXConstantClassesForModel(EOModel model) {
    for (Enumeration entitiesEnum = model.entities().objectEnumerator(); entitiesEnum.hasMoreElements();) {
      EOEntity entity = (EOEntity) entitiesEnum.nextElement();
      for (Enumeration attributesEnum = entity.attributes().objectEnumerator(); attributesEnum.hasMoreElements();) {
        EOAttribute attribute = (EOAttribute) attributesEnum.nextElement();
        NSDictionary attributeUserInfo = attribute.userInfo();
        if (attributeUserInfo != null) {
          String constantClassName = (String)attributeUserInfo.objectForKey("ERXConstantClassName");
          if (constantClassName != null) {
            boolean constantClassFound = true;
            try {
View Full Code Here


      if (attributes != null) {
        for (Enumeration e = attributes.objectEnumerator(); e.hasMoreElements();) {
          EOAttribute attribute = (EOAttribute) e.nextElement();
          boolean isClassProperty = classProperties.containsObject(attribute);
          boolean isUsedForLocking = attributesUsedForLocking.containsObject(attribute);
          Object languagesObject = attribute.userInfo() != null ? attribute.userInfo().objectForKey(LANGUAGES_KEY) : null;
          if (languagesObject != null && !(languagesObject instanceof NSArray)) {
            languagesObject = entity.model().userInfo() != null ? entity.model().userInfo().objectForKey(LANGUAGES_KEY) : null;
            if(languagesObject == null) {
              languagesObject = ERXProperties.arrayForKey(LANGUAGES_KEY);
            }
View Full Code Here

      if (attributes != null) {
        for (Enumeration e = attributes.objectEnumerator(); e.hasMoreElements();) {
          EOAttribute attribute = (EOAttribute) e.nextElement();
          boolean isClassProperty = classProperties.containsObject(attribute);
          boolean isUsedForLocking = attributesUsedForLocking.containsObject(attribute);
          Object languagesObject = attribute.userInfo() != null ? attribute.userInfo().objectForKey(LANGUAGES_KEY) : null;
          if (languagesObject != null && !(languagesObject instanceof NSArray)) {
            languagesObject = entity.model().userInfo() != null ? entity.model().userInfo().objectForKey(LANGUAGES_KEY) : null;
            if(languagesObject == null) {
              languagesObject = ERXProperties.arrayForKey(LANGUAGES_KEY);
            }
View Full Code Here

          NSArray languages = (languagesObject != null ? (NSArray) languagesObject : NSArray.EmptyArray);
          if (languages.count() > 0) {
            String name = attribute.name();
            String columnName = attribute.columnName();
            NSMutableDictionary attributeUserInfo = new NSMutableDictionary();
            if(attribute.userInfo() != null) {
              attributeUserInfo.addEntriesFromDictionary(attribute.userInfo());
            }
            attributeUserInfo.setObjectForKey(languages, LANGUAGES_KEY);
            for (int i = 0; i < languages.count(); i++) {
              String language = (String) languages.objectAtIndex(i);
View Full Code Here

          if (languages.count() > 0) {
            String name = attribute.name();
            String columnName = attribute.columnName();
            NSMutableDictionary attributeUserInfo = new NSMutableDictionary();
            if(attribute.userInfo() != null) {
              attributeUserInfo.addEntriesFromDictionary(attribute.userInfo());
            }
            attributeUserInfo.setObjectForKey(languages, LANGUAGES_KEY);
            for (int i = 0; i < languages.count(); i++) {
              String language = (String) languages.objectAtIndex(i);
              String newName = name + "_" + language;
View Full Code Here

    public static CopyType copyType(EOProperty property) {
      CopyType copyType;
      if (property instanceof EOAttribute) {
        EOAttribute attribute = (EOAttribute) property;
        @SuppressWarnings("unchecked")
        NSDictionary<String, Object> userInfo = attribute.userInfo();
        copyType = Utility.copyType(attribute, userInfo);
      }
      else {
        EORelationship relationship = (EORelationship) property;
        NSDictionary<String, Object> userInfo = relationship.userInfo();
View Full Code Here

    EOAttribute attribute = adaptor.createAttribute(_name, _name, _jdbcType, externalType, _precision, _scale, _allowsNull ? 1 : 0);
    if (_width > 0) {
      attribute.setWidth(_width);
    }
    if (_defaultValue != null) {
      NSDictionary userInfo = attribute.userInfo();
      NSMutableDictionary mutableUserInfo;
      if (userInfo == null) {
        mutableUserInfo = new NSMutableDictionary();
      }
      else {
View Full Code Here

            }
        }
        if (entity!=null && lastKey!=null) {
            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);
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.