...
Code Block | ||||
---|---|---|---|---|
| ||||
FUNCTION xpfGetHashedAttrInstancesBN (modelId : GENERIC;
entityName : STRING;
attributeName : STRING;
attrValue : STRING;
index : INTEGER;
maxHits : INTEGER;
VAR indexOfLastFound : INTEGER)
matchingInstances : SET OF GENERIC;
|
The xpfGetHashedAttrInstancesBN function is used to search the specified model for the instances with an attribute value equal to the specified attribute. The attribute is specified by name via the arguments <entityName> and <attributeName>. The argument <attrValue> is used to specify the attribute value, this value can be a string or integer. Additional input parameters are starting index and maximum number of hits. The index of last instance found and the aggregate of matching instances found are returned by the corresponding arguments.
If no attribute hash table is defined for the specified attribute, no sequential search is performed and the function returns an error code. See the functions xpxDefinePersistentAttrHashTable and xpxDefinePersistentAttrHashTableBN.
If no matching instances are found then the index of last found argument is zero and the matching instances argument is set to xpxINDETERMINATE.
Related functions: xpxGetHashedAttrInstances, xpfGetHashedAttrInstance and xpfGetHashedAttrInstanceBN.
This function is equivalent to the EDMinterfaceTM function edmiGetHashedAttrInstancesBN.
Arguments
...
Type | Name | Comment |
GENERIC | modelId | A numeric modelID that uniquely identifies the model of interest in the EDMdatabase |
STRING | entityName | The name of the entity that stores the attribute |
STRING | attributeName | A name of the attribute in the EDMdatabase |
STRING | attrValue | Specify the searched attribute value if the attribute type is of string type |
INTEGER | index | The index of the aggregate element to start reading from. The index of the first element in the actual aggregate will always be indexed zero, regardless of the aggregate type. Hence the legal index range is: 0<= index < number of elements in the aggregate |
INTEGER | maxHits | Specifies the maximum number of matching instances to return. If this number is greater than the limitation specified by the <maxBufferSize> argument, then the maximum number of hits will be calculated from the <maxBufferSize> argument |
INTEGER | indexOfLastFound | The index of the “last returned matching element”. This argument enables the caller to search for elements in an incremental way by specifying this returned “index value plus one” as the input to the next edmiGetHashedAttrInstances function and so on. |
Return Value
...
Type | Name | Comment |
SET OF GENERIC | matchingInstances | A SET containing the instanceID of each returned matching instance is stored. |
Options
...
Example
...
Code Block | ||
---|---|---|
| ||
<Missing Example> |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|