public void groupByInto(NSMutableArray recs, DRMasterCriteria amc, NSMutableDictionary recGrpDict) { Enumeration anEnum = recs.objectEnumerator(); while (anEnum.hasMoreElements()) { DRRecord rec = (DRRecord)anEnum.nextElement(); amc.groupRecordRecordGroupsDictGroupParent(rec, recGrpDict, group(), this); } }
public void _removeInstancePrimitive(MInstance anInstance) { _instanceArray.removeObject(anInstance); boolean uniqueHost = true; for (Enumeration e = _instanceArray.objectEnumerator(); e.hasMoreElements(); ) { MInstance anInst = (MInstance) e.nextElement(); if (anInstance._host == anInst._host) { uniqueHost = false; break; } } if (uniqueHost) { _hostArray.removeObject(anInstance._host); } } /**********/
public void _removeInstancePrimitive(MInstance anInstance) { _instanceArray.removeObject(anInstance); // get the instances's host - check all the other instances that this // application has to see if any other ones have that host // if not, remove it. boolean uniqueApplication = true; for (Enumeration e = _instanceArray.objectEnumerator(); e.hasMoreElements();) { MInstance anInst = (MInstance) e.nextElement(); if (anInstance._application == anInst._application) { uniqueApplication = false; break; } } if (uniqueApplication) { _applicationArray.removeObject(anInstance._application); } }
public NSDictionary buildPresetLookupDict() { NSMutableDictionary adict = new NSMutableDictionary(); Enumeration anEnum = _possibleValues.objectEnumerator(); while (anEnum.hasMoreElements()) { Object aval = anEnum.nextElement(); // WARNING adict.setObjectForKey(aval, aval); } return new NSDictionary(adict); }
public void flatListForAttributeListTotals() { _flatAttributeListTotal.removeAllObjects(); _flatAttributeListTotalDict.removeAllObjects(); Enumeration anEnum = _flatAttributeList.objectEnumerator(); while (anEnum.hasMoreElements()) { DRAttribute att = (DRAttribute)anEnum.nextElement(); if (att.shouldTotal()) { _flatAttributeListTotal.addObject(att); } } getFlatAttributeDepthDictTotals(); //OWDebug.println(1, "_flatAttributeListTotalDict:"+ _flatAttributeListTotalDict); }
protected void _removeSortOrderingWithKey(String aKey) { int anIndex = 0; EOSortOrdering aSortOrdering = null; WODisplayGroup aDisplayGroup = displayGroup(); NSArray<EOSortOrdering> sortOrderings = aDisplayGroup.sortOrderings(); if (sortOrderings!=null) { NSMutableArray<EOSortOrdering> aSortOrderingArray = sortOrderings.mutableClone(); Enumeration anEnumerator = aSortOrderingArray.objectEnumerator(); while (anEnumerator.hasMoreElements()) { aSortOrdering = (EOSortOrdering) anEnumerator.nextElement(); if (aKey.equals(aSortOrdering.key())) { aSortOrderingArray.removeObjectAtIndex(anIndex); break; } anIndex++; } aDisplayGroup.setSortOrderings(aSortOrderingArray); } }
protected void _removeSortOrderingWithKey(String aKey) { int anIndex = 0; EOSortOrdering aSortOrdering = null; WODisplayGroup aDisplayGroup = displayGroup(); NSArray<EOSortOrdering> sortOrderings = aDisplayGroup.sortOrderings(); if (sortOrderings!=null) { NSMutableArray<EOSortOrdering> aSortOrderingArray = sortOrderings.mutableClone(); Enumeration anEnumerator = aSortOrderingArray.objectEnumerator(); while (anEnumerator.hasMoreElements()) { aSortOrdering = (EOSortOrdering) anEnumerator.nextElement(); if (aKey.equals(aSortOrdering.key())) { aSortOrderingArray.removeObjectAtIndex(anIndex); break; } anIndex++; } aDisplayGroup.setSortOrderings(aSortOrderingArray); } }
public synchronized NSArray orderedComponents(EOEditingContext ec) { NSMutableArray result = new NSMutableArray(); if (_cachedComponentsByGlobalID == null) { _cachedComponents = new NSMutableArray(); _cachedComponentsByGlobalID = new NSMutableDictionary(); addChildrenOfComponentToArray(null, result, ec); int level = 0; for (Enumeration e = result.objectEnumerator(); e.hasMoreElements();) { Component component = (Component) e.nextElement(); String sortOrder = (level < 10 ? "0" : "") + (level); _cachedComponentsByGlobalID.setObjectForKey(sortOrder, component.permanentGlobalID()); _cachedComponents.addObject(component.permanentGlobalID()); level++; } } result.removeAllObjects(); for (Enumeration e = _cachedComponents.objectEnumerator(); e.hasMoreElements();) { EOGlobalID gid = (EOGlobalID) e.nextElement(); Component component = (Component) ec.faultForGlobalID(gid, ec); if(component != null) { result.addObject(component); } else { log.error("No object: " + gid); } } return result; }
return null; Enumeration enumeration = _children.objectEnumerator(); if (enumeration != null) { nsmutablearray = new NSMutableArray(_children.count());
StringBuilder sb = new StringBuilder("<?xml version=\"1.0\" encoding=\"ASCII\"?>\n<adaptor>\n"); for (Enumeration e = applicationArray().objectEnumerator(); e.hasMoreElements(); ) { MApplication anApp = (MApplication) e.nextElement();
result.append("ProxyRequests On\nProxyMaxForwards 10000\nProxyVia Full\n"); for (Enumeration e = applicationArray().objectEnumerator(); e.hasMoreElements(); ) { MApplication anApp = (MApplication) e.nextElement();
@Override protected NSArray flatAttributesWithDepthDictionary(int attributeListDepth, NSMutableDictionary flatAttributeDepthDict) { DRAttribute att; Enumeration anEnum = _attributes.objectEnumerator(); _flatAttributes.removeAllObjects(); attributeListDepth = attributeListDepth + 1; while (anEnum.hasMoreElements()) { att = (DRAttribute)anEnum.nextElement(); flatListForAttributeDepthDictionary(att, attributeListDepth, flatAttributeDepthDict); } if (flatAttributeDepthDict != null && showTotal()) { Number dpthKey = Integer.valueOf(attributeListDepth); NSMutableArray lst = (NSMutableArray)flatAttributeDepthDict.objectForKey(dpthKey); if (lst == null) { lst = new NSMutableArray(); flatAttributeDepthDict.setObjectForKey(lst, dpthKey); } lst.addObject(DRAttribute.withAttributeGroup(this)); } return _flatAttributes; }
protected void handleSave(EOEditingContext ec, String typeKey, NSArray objects) { if (objects == null) return; for (Enumeration e = objects.objectEnumerator(); e.hasMoreElements();) { EOEnterpriseObject eo = (EOEnterpriseObject) e.nextElement(); Configuration config = configuration.objectForKey(eo.entityName()); if (config != null) { if (config.isAudited) { handleSave(ec, typeKey, eo); } else { for (Enumeration e1 = config.notificationKeys.objectEnumerator(); e1.hasMoreElements();) { String key = (String) e1.nextElement(); EOEnterpriseObject target = (EOEnterpriseObject) eo.valueForKey(key); EOEntity entity = ERXEOAccessUtilities.entityForEo(eo); String inverse = entity.relationshipNamed(key).anyInverseRelationship().name(); if (typeKey.equals(EOEditingContext.UpdatedKey)) { handleUpdate(ec, target, inverse, eo); } else if (typeKey.equals(EOEditingContext.InsertedKey)) { handleAdd(ec, target, inverse, eo); } else if (typeKey.equals(EOEditingContext.DeletedKey)) { target = (EOEnterpriseObject) ec.committedSnapshotForObject(eo).valueForKey(key); handleRemove(ec, target, inverse, eo); } } } } } }
_content.append(originalContent); if (_responseAppenders != null) { Enumeration responseAppendersEnum = _responseAppenders.objectEnumerator(); while (responseAppendersEnum.hasMoreElements()) { AjaxResponseAppender responseAppender = (AjaxResponseAppender) responseAppendersEnum.nextElement();
protected NSArray _ignoredPackages() { NSBundle bundle; String path, content; NSDictionary dic = null; NSMutableArray<NSBundle> allBundles = new NSMutableArray<>(NSBundle.frameworkBundles()); NSMutableArray<String> ignored = new NSMutableArray<>(); for (Enumeration enumerator = allBundles.objectEnumerator(); enumerator.hasMoreElements(); ) { bundle = (NSBundle) enumerator.nextElement(); path = WOApplication.application().resourceManager().pathForResourceNamed("WOIgnoredPackage.plist",bundle.name(),null); if (path != null) { content = _stringFromFileSafely(path); if (content != null) { dic = (NSDictionary) NSPropertyListSerialization.propertyListFromString(content); if (dic != null && dic.containsKey("ignoredPackages")) { @SuppressWarnings("unchecked") NSArray<String> tmpArray = (NSArray<String>) dic.objectForKey("ignoredPackages"); if (tmpArray != null && tmpArray.count() > 0) { ignored.addObjectsFromArray(tmpArray); } } } } } System.out.println("_ignoredPackages:: "+ignored); return ignored; }
for(Enumeration en = recordList().objectEnumerator(); en.hasMoreElements(); ) { int i = 0; DRRecord rec = (DRRecord)en.nextElement();
protected NSDictionary serializeObject(EOEnterpriseObject eo) { NSMutableDictionary<String, Object> result = new NSMutableDictionary<>(); result.addEntriesFromDictionary(eo.snapshot()); for (Enumeration e = eo.snapshot().keyEnumerator(); e.hasMoreElements();) { String key = (String) e.nextElement(); Object value = result.objectForKey(key); if (value instanceof ERXConstant.Constant) { ERXConstant.Constant constant = (ERXConstant.Constant) value; result.setObjectForKey(constant.value(), key); } else if (value == NSKeyValueCoding.NullValue) { result.removeObjectForKey(key); } else if (value instanceof ERXGenericRecord) { ERXGenericRecord rec = (ERXGenericRecord) value; result.setObjectForKey(ERXKeyGlobalID.globalIDForGID(rec.permanentGlobalID()).asString(), key); } else if (value instanceof NSArray) { NSArray oldValue = (NSArray) value; NSMutableArray newValue = new NSMutableArray(oldValue.count()); for (Enumeration e1 = newValue.objectEnumerator(); e1.hasMoreElements();) { ERXGenericRecord rec = (ERXGenericRecord) e1.nextElement(); newValue.addObject(ERXKeyGlobalID.globalIDForGID(rec.permanentGlobalID()).asString()); } result.setObjectForKey(newValue, key); } } return result; }
for (Enumeration e = config.keys.objectEnumerator(); e.hasMoreElements();) { String key = (String) e.nextElement(); EOEntity source = entity;
if (config != null) { if (!config.active) { for (Enumeration e1 = config.notificationKeys.objectEnumerator(); e1.hasMoreElements();) { String key = (String) e1.nextElement(); Object value = null;