For

For

Executes a child generator i times. i can be produced by any number generator or even from referencing a generator.resultsToList controls if the results from the generator within <do></do> should be collected into a list or if it should just be executed i times and the last result should be taken.
Example:
<field name="forGeneratorExample" size="50" type="VARCHAR" >
<gen_ForGenerator resultsToList="true">
<i>
<gen_LongGenerator>
<min>1</min><max>3</max>
</gen_LongGenerator>
</i>
<do>
<gen_StaticValueGenerator><value>foo</value></gen_StaticValueGenerator>
</do>
</gen_ForGenerator>
</field>

Attributes
Name Description Required Min Max Allowed Values
name (Class)Name of this element. Used to identify plugin Class. Full name is required. Example: com.en.myPluginPackage.myPuginClass no 0 1
resultsToList Content type: Boolean
Add each iteration result into an ArrayList.
Default: true
no 0 1
  • true
  • false
  • 0
  • 1
id Identification String of this element. May be used to uniquely identify a field within the children of an Element. no 0 1
listName Content type: String
Name of the generated list. List will be of type bankmark.pdgf.util.io.generator.collection.NamedList and has a getName() method which you can use in your custom output to get easy access to this specific list.
Default: <not set>
no 0 1
Nodes
Name Description Required Min Max Allowed Values
i Content type: Sub-generator
A generator which provides a long number has to be specified to set the iteration count for the loop.
yes 1 1
sameChoiceAs Content type: Empty
Requires a <field> and a <generatorByID> attribute (in same table) to pick the row number from. If specified this For does not choose a random row, but it uses the same row as the referenced generator.
Default: <not set>
no 0 1
do Content type: Sub-generator
Sub-generator which will be run <i> times in a loop.
yes 1 1
2.7-83fb0 | 2020-04-22