This function allows you to add to the element map with the specified identifier a number of key/element associations at once.
The function works the following way.
sourceElements
enumeration are iterated.
keysQuery
parameter is executed which produces one or several keys.
elementsQuery
subquery is present, it is executed as well,
which produces the elements that are actually put in the map:
each newly generated element is associated with every key generated by
keysQuery
subquery.
elementsQuery
subquery is absent, the current
source element is put in the map associated with every key generated by
keysQuery
subquery.
Parameters:
elementMapId
Note: When the element map with such an identifier does not exist, the generator raises an error.
sourceElements
elementsQuery
parameter for more details).
That element enumeration may be produced by a certain "heavy" query, exactly the one whose repeating the entire element map is supposed to avoid.
keysQuery
sourceElements
parameter.
The keys subquery should be created using FlexQuery
function.
It should generate one or many keys for the source element passed as the
generator context element.
The result returned by the subquery may be one of the following:
Object[]
containing keysVector
containing keysnull
value returned by the subquery is interpreted as no keys.
That means, the given source element will not be associated with any keys.
elementsQuery
keysQuery
subquery.
The object returned by the elementsQuery
subquery may be one of the following:
Enumeration
of elementsnull
value will be treated as no elements.
That is, nothing will be put in the element map on the given iteration.
createElementMap(), prepareElementMap(),
putElementByKey(), putElementByKeys(), putElementsByKey()