Adds to the specified element map all mappings contained in another element map.

Note: If an element mapping already exists in the destination element map, it is not changed.

Parameter:

elementMapId

The object that identifies the destination element map.
sourceMapId
The object that identifies the source element map.
elementsQuery
This parameter allows you to transform the original mapped elements into some different elements.

If this subquery is specified, it is executed against each element from the source map (accessible in the subquery as the context element; see 'contextElement' property). Only those elements returned by the subquery will be put in the destination map (by the same key as the original element).

The object returned by the elementsQuery subquery may be one of the following:

  1. A single element
  2. An Enumeration of elements
The null value will be treated as no elements. That is, nothing will be put in the destination map in place of the original element.
Returns:
The number of new key/element associations added to the destination element map.
See Also:
getMappedElements(), countMappedElements(), getElementMapKeys()