To be completed (add example)
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>. Number of instances found is returned via the argument <numberOfHits>.
If no attribute hash table is defined for the specified attribute, no sequential search is performed and the function returns an error code.
Related functions: edmiRemoteGetHashedAttrInstanceBN, edmiRemoteGetHashedAttrInstances, edmiRemoteGetHashedAttrInstancesBN
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteGetHashedAttrInstancesBN(SdaiServerContext serverContextId, SdaiModel modelId, SdaiString entityName, SdaiString attributeName, SdaiString attrStringValue, SdaiInteger attrIntegerValue, SdaiInteger maxBufferSize, SdaiInteger *index, SdaiInteger *numberOfHits, SdaiInstance *resultBuffer, SdaiInvocationId *edmiInvocationId);
Arguments:
serverContextId |
Context identification, from edmiDefineServerContext |
modelId |
The modelId that uniquely identifies the edmModel in the remote EDMdatabase. |
entityName |
The name of the entity that defines the attribute of interrest. Entity names are case insensitive. |
attributeName |
The name of the attribute of interrest. Attribute names are case insensitive. |
attrStringValue |
If the attribute is of <string type>, use this argument to specify the attribute value to search for. |
attrIntegerValue |
If the attribute is of <integer type>, use this argument to specify the attribute value to search for. |
maxBufferSize |
The size of the buffer in which the indexes of all the matching aggregate elements will be returned. The number of returned indexes will never exceed this number. |
*index |
In: The index of the aggregate element to start reading from. The first element is indexed zero. Hence the legal index range is: [ 0 <= index < N ] , where N is the number of elements in the aggregate. |
*numberOfHits |
In: The maximum number of matching aggregate element indexes to return.If this number is greater than the limitation specified by the <maxBufferSize> argument, the maximum number of hits will be overruled by the value given in the <maxBufferSize> argument. |
*resultBuffer |
A buffer, allocated by the calling application, that will receive the indexes of the matching aggregate elements. Use the <maxBufferSize> argument to prevent writing past the end of this buffer. |
*edmiInvocationId |
Currently not used. |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an _EDMinterface_ error code. Use edmiGetErrorText to get the error text corresponding to the error code.
Example:
EdmiError rstat;