tokenizer.nextToken(); String quotedStringKey = WOHelperFunctionDeclarationParser.QUOTED_STRING_KEY + _quotedStrings.count(); if (NSLog.debugLoggingAllowedForLevelAndGroups(3, 0x0L)) { NSLog.debug.appendln("Found a quoted string: " + quotedStringKey + "='" + token + "';");
/** * Change to the next step. Overridden to set _currentStep here instead of in appendToResponse * so ajax requests work */ @Override public WOComponent nextStep() { // FIXME: This is no longer needed. We now have validationKeys that will serve the same purpose. NSNotificationCenter.defaultCenter().postNotification(ERD2WWizardCreationPage.WILL_GOTO_NEXT_PAGE, null); if (errorMessages.count()==0 && _currentStep < tabSectionsContents().count()) _currentStep++; setCurrentTab(tabSectionsContents().objectAtIndex(_currentStep-1)); return null; }
public void handleSave(NSNotification n) { if (configuration.count() == 0) return; EOEditingContext ec = (EOEditingContext) n.object(); if (ec.parentObjectStore() instanceof EOObjectStoreCoordinator) { ec.processRecentChanges(); NSArray<EOEnterpriseObject> insertedObjects = ec.insertedObjects().immutableClone(); for (EOEnterpriseObject eo : insertedObjects) { if(ERCAuditTrailEntry.clazz.entityName().equals(eo.entityName())) { ec.deleteObject(eo); } if(ERCAuditTrail.clazz.entityName().equals(eo.entityName())) { ec.deleteObject(eo); } } ec.processRecentChanges(); NSArray updatedObjects = ec.updatedObjects(); NSArray deletedObjects = ec.deletedObjects(); handleSave(ec, EOEditingContext.InsertedKey, insertedObjects); handleSave(ec, EOEditingContext.UpdatedKey, updatedObjects); handleSave(ec, EOEditingContext.DeletedKey, deletedObjects); } }
protected NSMutableDictionary<String, Object> rowFromStoredValues(NSMutableDictionary<String, Object> rawRow, EOEntity entity) { NSMutableDictionary<String, Object> row = new NSMutableDictionary<>(rawRow.count()); for (EOAttribute attribute : entity.attributesToFetch()) { Object value = rawRow.objectForKey(attribute.columnName()); if (attribute.isDerived()) { if (!attribute.isFlattened()) { // Evaluate derived attribute expression /* //This is a hack to support SQL string concatenation in derived attributes String expression = attribute.definition().replaceAll("\\|\\|", "+ '' +"); try { value = Ognl.getValue(expression, rawRow); } catch (Throwable t) { t.printStackTrace(); } */ } else { String dstKey = attribute.definition(); value = rawRow.objectForKey(dstKey); } } row.setObjectForKey(value != null ? value : NSKeyValueCoding.NullValue, attribute.name()); } return row; }
if (loopData.count() == 0) { throw new RuntimeException("No 'values' or 'targets' metacommands specified between 'repeat' and 'done'");