Code Block | ||||
---|---|---|---|---|
| ||||
FUNCTION xpfGetHashedAttrInstanceEx (modelId : GENERIC;
entityId : GENERIC;
attrId : GENERIC;
attrValue : GENERIC)
matchingInstanceId : GENERIC;
|
The xpfGetHashedAttrInstance function is used to search the specified model for the instance id of the instance where the specified attribute has exactly the specified value. The attribute is specified by the attribute id, the entity by entity id. The argument <attrValue> is used to specify the attribute value, this value can be a string or integer. This function returns only one instance id, which implies that you only should use this function if the attribute value is defined to be unique. If the attribute value may occur in more than one instance, use xpxGetHashedAttrInstances.
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.
...
Function to search an given EDMpersitentAttrHashTable for an element (instanceId) that matches a specified string value.
Info |
---|
By intoducing the xpxDefinePersistentAttrHashTableBNEx() function, it is possible to have more than one EDMpersitentAttrHashTable for the same attribute in the same model. The functions xpfGetHashedAttrInstance(), xpxGetHashedAttrInstances(), xpfGetHashedAttrInstances() will not disinguish between different EDMpersitentAttrHashTables for the same attribute, since only the model and the attribute are used for identifying the actual EDMpersitentAttrHashTable. The functions xpfGetHashedAttrInstanceEx() and xpfGetHashedAttrInstancesEx() uses the combination of model, entity and attribute to identify an EDMpersitentAttrHashTable, i.e., these function can also disinguish between different EDMpersitentAttrHashTables for the same attribute in a model. |
Arguments
...
1 | Type | Name | Comment |
2 | GENERIC | modelId | Specifies the EDMdataModel to search in. The combination of the arguments "modelId", "entityId" and "attrId" uniquely identifies an EDMpersitentAttrHashTable in an EDMdatabase. |
3 | GENERIC | entityId | An enityId that is part of the actual EDMpersitentAttrHashTable identification |
4 | GENERIC | attrId | An attributeId that is part of the actual EDMpersitentAttrHashTable identification |
5 | STRING | attrValue | Specifies the actual string value to search for in the given EDMpersitentAttrHashTable. |
Return Value
...
Type | Name | Comment |
GENERIC | matchingInstanceId | When the xpfGetHashedAttrInstanceEx() operation is successfully performed, the instanceId of the EDMpersitentAttrHashTable entry that matches the string value specified in the "attrValue" argument will be returned else the constant xpxNULLID will be returned. The value INDETERMINATE (?) will be returned when the xpfGetHashedAttrInstanceEx() operation fails. Exception handling should be used to handle error conditions in the actual xpfGetHashedAttrInstanceEx() operation. |
Options
...
Example
...
<example missing>
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|