Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagecpp
themeConfluence
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

...

 

1TypeNameComment
2GENERICmodelIdSpecifies the EDMdataModel to search in.  The combination of the arguments "modelId", "entityId" and "attrId" uniquely identifies an EDMpersitentAttrHashTable in an EDMdatabase.
3GENERICentityId An enityId that is part of the actual EDMpersitentAttrHashTable identification
4GENERICattrIdAn attributeId that is part of the actual EDMpersitentAttrHashTable identification
5STRINGattrValueSpecifies the actual string value to search for in the given EDMpersitentAttrHashTable.

Return Value

...

 

TypeNameComment
GENERICmatchingInstanceIdWhen 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)
showLabelsfalse
showSpacefalse
cqllabel = "hashedattribute" and parent = "5636522"