Package com.webobjects.foundation

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


                for (Enumeration e = tabSectionContentsFromRule.objectEnumerator(); e.hasMoreElements();) {
                    NSArray tab = (NSArray) e.nextElement();
                    ERD2WContainer c = new ERD2WContainer();
                    c.name = (String) tab.objectAtIndex(0);
                    c.keys = new NSMutableArray();
                    Object testObject = tab.objectAtIndex(1);
                    if (testObject instanceof NSArray) { // format #2
                        for (int i = 1; i < tab.count(); i++) {
                            NSArray sectionArray = (NSArray) tab.objectAtIndex(i);
                            ERD2WContainer section = new ERD2WContainer();
                            section.name = (String) sectionArray.objectAtIndex(0);
View Full Code Here


                    Object testObject = tab.objectAtIndex(1);
                    if (testObject instanceof NSArray) { // format #2
                        for (int i = 1; i < tab.count(); i++) {
                            NSArray sectionArray = (NSArray) tab.objectAtIndex(i);
                            ERD2WContainer section = new ERD2WContainer();
                            section.name = (String) sectionArray.objectAtIndex(0);
                            section.keys = new NSMutableArray(sectionArray);
                            section.keys.removeObjectAtIndex(0);
                            c.keys.addObject(section);
                        }
                    } else { // format #1
View Full Code Here

          // WOApplication.application().port().toString();

          // WO 5.1.x -- Apple Ref# 2260519
          NSArray adaptors = WOApplication.application().adaptors();
          if (adaptors != null && adaptors.count() > 0) {
            WOAdaptor primaryAdaptor = (WOAdaptor) adaptors.objectAtIndex(0);
            _portNumber = String.valueOf(primaryAdaptor.port());
          }
        }
      }
      return _portNumber != null ? _portNumber : "N/A";
View Full Code Here

          }
          else {
            // WO 5.1.x -- Apple Ref# 2260519
            NSArray adaptors = app.adaptors();
            if (adaptors != null && adaptors.count() > 0) {
              WOAdaptor primaryAdaptor = (WOAdaptor) adaptors.objectAtIndex(0);
              String portNumber = String.valueOf(primaryAdaptor.port());
              if (portNumber != null) {
                _appInfo.setObjectForKey(portNumber, "portNumber");
              }
            }
View Full Code Here

    boolean numericPKs = false;
    if (classDescription instanceof EOEntityClassDescription) {
      EOEntity entity = ((EOEntityClassDescription)classDescription).entity();
      NSArray primaryKeyAttributes = entity.primaryKeyAttributes();
      if (primaryKeyAttributes.count() == 1) {
        EOAttribute primaryKeyAttribute = (EOAttribute) primaryKeyAttributes.objectAtIndex(0);
        Class primaryKeyClass = _NSUtilities.classWithName(primaryKeyAttribute.className());
        numericPKs = primaryKeyClass != null && Number.class.isAssignableFrom(primaryKeyClass);
      }
    }
    return numericPKs;
View Full Code Here

    public Object tabSectionsContents(D2WContext context) {
        NSMutableArray tabSectionsContents=new NSMutableArray();
        for (Enumeration e= ((NSArray)value()).objectEnumerator(); e.hasMoreElements();) {
            NSArray tab=(NSArray)e.nextElement();
            ERD2WContainer c=new ERD2WContainer();
            c.name=(String)tab.objectAtIndex(0);
            c.keys=new NSMutableArray();
            Object testObject=tab.objectAtIndex(1);
            if (testObject instanceof NSArray) { // format #2
                for (int i=1; i<tab.count(); i++) {
                    NSArray sectionArray=(NSArray)tab.objectAtIndex(i);
View Full Code Here

  public NSDictionary _newPrimaryKey(EOEnterpriseObject object, EOEntity entity) {
    NSArray pkAttributes = entity.primaryKeyAttributes();
    if (pkAttributes.count() > 1) {
      throw new ERLuceneAdaptorException("Failed to generate primary key because " + entity.name() + " has a composite primary key.");
    }
    EOAttribute pkAttribute = (EOAttribute) pkAttributes.objectAtIndex(0);
    Object pkValue = null;
    String className = pkAttribute.className();
    String valueType = pkAttribute.valueType();
    if ("com.webobjects.foundation.NSData".equals(className)) {
//      if(true==false) {
View Full Code Here

        for (Enumeration e= ((NSArray)value()).objectEnumerator(); e.hasMoreElements();) {
            NSArray tab=(NSArray)e.nextElement();
            ERD2WContainer c=new ERD2WContainer();
            c.name=(String)tab.objectAtIndex(0);
            c.keys=new NSMutableArray();
            Object testObject=tab.objectAtIndex(1);
            if (testObject instanceof NSArray) { // format #2
                for (int i=1; i<tab.count(); i++) {
                    NSArray sectionArray=(NSArray)tab.objectAtIndex(i);
                    ERD2WContainer section=new ERD2WContainer();
                    section.name=(String)sectionArray.objectAtIndex(0);
View Full Code Here

            Object testObject=tab.objectAtIndex(1);
            if (testObject instanceof NSArray) { // format #2
                for (int i=1; i<tab.count(); i++) {
                    NSArray sectionArray=(NSArray)tab.objectAtIndex(i);
                    ERD2WContainer section=new ERD2WContainer();
                    section.name=(String)sectionArray.objectAtIndex(0);
                    section.keys=new NSMutableArray(sectionArray);
                    section.keys.removeObjectAtIndex(0);
                    c.keys.addObject(section);
                }
            } else { // format #1
View Full Code Here

        if (mk==null && propertyKey()!=null && propertyKey().indexOf(".")!=-1) {
            // if the key is not mentioned we render it EXCEPT if it is a key path
            // and the first atom of that kp is not rendering (in which case the keypath we know will fail
            NSArray components=NSArray.componentsSeparatedByString(propertyKey(),".");
            NSDictionary mapping=(NSDictionary)d2wContext().valueForKey("keyMappingsForComparisonObject");
            String mappingForFirstAtom=(String)mapping.objectForKey(components.objectAtIndex(0));
            if (mappingForFirstAtom!=null && mappingForFirstAtom.length()==0) mk="";
        }
        return (mk==null || mk.length()>0) && propertyKey()!=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.