Package com.webobjects.eoaccess

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


          l = (entity.model().userInfo() != null ? entity.model().userInfo().valueForKey("ERXLanguages") : null);
        }

        NSArray languages = (NSArray) l;
        if (languages != null && languages.count() > 0) {
          String columnName = attribute.columnName();
          for (int i = 0; i < languages.count(); i++) {
            String language = (String) languages.objectAtIndex(i);
            String newName = name + "_" + language;
            String newColumnName = columnName + "_" + language;
View Full Code Here


          l = (entity.model().userInfo() != null ? entity.model().userInfo().valueForKey("ERXLanguages") : null);
        }

        NSArray languages = (NSArray) l;
        if (languages != null && languages.count() > 0) {
          String columnName = attribute.columnName();
          for (int i = 0; i < languages.count(); i++) {
            String language = (String) languages.objectAtIndex(i);
            String newName = name + "_" + language;
            String newColumnName = columnName + "_" + language;
View Full Code Here

      NSMutableDictionary<String, Object> mutableRow = new NSMutableDictionary<String, Object>(row.size());
      for (Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements();) {
        EOAttribute attribute = (EOAttribute) e.nextElement();
        Object value = row.objectForKey(attribute.name());
        if (!attribute.isDerived())
          mutableRow.setObjectForKey(value != null ? value : NSKeyValueCoding.NullValue, attribute.columnName());
      }
      _insertRow(mutableRow, entity);
    }
    catch (EOGeneralAdaptorException e) {
      throw e;
View Full Code Here

        NSMutableDictionary<String, Object> row = rowFromStoredValues(rawRow, entity);
       
        if (qualifier == null || qualifier.evaluateWithObject(row)) {
          for (Map.Entry<String, Object> entry : updatedRow.entrySet()) {
            EOAttribute attribute = entity.attributeNamed(entry.getKey());
            rawRow.setObjectForKey(entry.getValue(), attribute.columnName());
          }
          count++;
        }
      }
View Full Code Here

                                    Object aKey = someKeys.objectAtIndex(keyIndex);
                                    EOAttribute anAttribute = anEntity.attributeNamed(aKey.toString());
                                    if (anAttribute != null) {
                                        Object aValue = aRow.objectForKey(aKey);

                                        NSKeyValueCoding.DefaultImplementation.takeValueForKey(aFile, aValue, anAttribute.columnName());
                                    }
                                }
                            }
                            return count;
                        }
View Full Code Here

      for (int rowNum = 0; rowNum < rowElements.getLength(); rowNum++) {
        NSMutableDictionary<String, Object> row = new NSMutableDictionary<String, Object>();
        Element rowElement = (Element) rowElements.item(rowNum);
        for (int attributeNum = 0; attributeNum < attributesToFetch.count(); attributeNum++) {
          EOAttribute attribute = (EOAttribute) attributesToFetch.objectAtIndex(attributeNum);
          String columnName = attribute.columnName();
          NodeList attributeElements = rowElement.getElementsByTagName(columnName);

          Object value;
          if (attributeElements.getLength() == 0) {
            if (rowElement.hasAttribute(columnName)) {
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);
View Full Code Here

    }

    public static EOAttribute attributeWithColumnNameFromEntity(String columnName, EOEntity entity) {
        for (Enumeration e = entity.attributes().objectEnumerator(); e.hasMoreElements();) {
            EOAttribute att = (EOAttribute)e.nextElement();
            if (columnName.equalsIgnoreCase(att.columnName())) {
                return att;
            }
        }
        return null;
    }
View Full Code Here

              }
              if (attribute != null && externalTypesToIgnore.indexOfObject(attribute.externalType()) != NSArray.NotFound) {
                continue;
              }
              validIndex = true;
              String columnName = attribute == null ? attributeName : attribute.columnName();
              columnBuf.append(columnName);
              if (attributes.hasMoreElements()) {
                columnBuf.append(", ");
              }
            }
View Full Code Here

              if (attribute != null && externalTypesToIgnore.indexOfObject(attribute.externalType()) != NSArray.NotFound) {
                continue;
              }
              validIndex = true;

              String columnName = attribute == null ? attributeName : attribute.columnName();
              columnBuf.append(columnName);
              if (e.hasMoreElements()) {
                columnBuf.append(", ");
              }
            }
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.