@Test public void testAddFields_IdAdded() throws Exception { final Set<String> fields = new LinkedHashSet<>(); XmlObject testObject = createObject( "Id", VALUE, ObjectType.XMLOBJECT ); dialog.addFields( "", fields, testObject ); assertArrayEquals( "Id field added", new String[]{"Id"}, fields.toArray() ); }
void addFields( String prefix, Set<String> fieldNames, XmlObject field ) { if ( isNullIdField( field ) ) { return; } String fieldname = prefix + field.getName().getLocalPart(); if ( field instanceof SObject ) { SObject sobject = (SObject) field; for ( XmlObject element : SalesforceConnection.getChildren( sobject ) ) { addFields( fieldname + ".", fieldNames, element ); } } else { addField( fieldname, fieldNames, (String) field.getValue() ); } }
SalesforceInputDialog extends SalesforceStepDialog { void addFields( String prefix, Set<String> fieldNames, XmlObject field ) { if ( isNullIdField( field ) ) { return; } String fieldname = prefix + field.getName().getLocalPart(); if ( field instanceof SObject ) { SObject sobject = (SObject) field; for ( XmlObject element : SalesforceConnection.getChildren( sobject ) ) { addFields( fieldname + ".", fieldNames, element ); } } else { addField( fieldname, fieldNames, (String) field.getValue() ); } } }
SalesforceInputDialog extends SalesforceStepDialog { void addFields( String prefix, Set<String> fieldNames, XmlObject field ) { if ( isNullIdField( field ) ) { return; } String fieldname = prefix + field.getName().getLocalPart(); if ( field instanceof SObject ) { SObject sobject = (SObject) field; for ( XmlObject element : SalesforceConnection.getChildren( sobject ) ) { addFields( fieldname + ".", fieldNames, element ); } } else { addField( fieldname, fieldNames, (String) field.getValue() ); } } SalesforceInputDialog( Shell parent, Object in, TransMeta transMeta, String sname ); }
SalesforceInputDialog extends SalesforceStepDialog { void addFields( String prefix, Set<String> fieldNames, XmlObject field ) { if ( isNullIdField( field ) ) { return; } String fieldname = prefix + field.getName().getLocalPart(); if ( field instanceof SObject ) { SObject sobject = (SObject) field; for ( XmlObject element : SalesforceConnection.getChildren( sobject ) ) { addFields( fieldname + ".", fieldNames, element ); } } else { addField( fieldname, fieldNames, (String) field.getValue() ); } } SalesforceInputDialog( Shell parent, Object in, TransMeta transMeta, String sname ); @Override String open(); void getData( SalesforceInputMeta in ); void setPosition(); }
SalesforceInputDialog extends SalesforceStepDialog { void addFields( String prefix, Set<String> fieldNames, XmlObject field ) { if ( isNullIdField( field ) ) { return; } String fieldname = prefix + field.getName().getLocalPart(); if ( field instanceof SObject ) { SObject sobject = (SObject) field; for ( XmlObject element : SalesforceConnection.getChildren( sobject ) ) { addFields( fieldname + ".", fieldNames, element ); } } else { addField( fieldname, fieldNames, (String) field.getValue() ); } } SalesforceInputDialog( Shell parent, Object in, TransMeta transMeta, String sname ); @Override String open(); void getData( SalesforceInputMeta in ); void setPosition();  }