Returns an element that is associated with the given key in the element map with the specified identifier and satisfies the filter condition (if specified).
If there are many such elements, the function returns the one that has been put in the element map the first.
If there are no complying elements, the function returns null
.
Effectively, the function is the equivalent of the following call:
findElementsByKey (
elementMapId,
key,
filterQuery
).next().toElement()
Parameters:
elementMapId
Note: When the element map with such an identifier does not exist, the generator raises an error.
key
filterQuery
When specified, this should be a boolean subquery
created with BooleanQuery()
function.
The subquery will be processed against each initially selected element
and should return true
if the element may be returned by
the function and false
otherwise.
The tested element is passed as the generator context element.
findLastElementByKey(), putElementByKey(), removeElementByKey(), BooleanQuery()