xpfGetAttrsHashedValue

xpfGetAttrsHashedValue (hashTableIndex, index               : INTEGER;
                        attr1Value, attr2Value, attr3Value  : STRING;
                        attr4Value, attr5Value, attr6Value  : STRING;
                        attr7Value, attr8Value, attr9Value  : STRING;
                        attr10Value                         : STRING)
                        instanceId                          : GENERIC;
                

The xpfMakeAttrsHashTable function establishes a hash table for instances of one specific entity type. Such a hash table is made with a certain number of keys (max is 10). The function has a variable length argument list. xpfGetAttrsHashedValues looks up in a hash table made by xpfMakeAttrsHashTable, supplying  the same number of keys (attribute values) that the hash table was made for. The function has a variable length argument list.

Arguments


1TypeNameComment
2GENERIChashTableIndexthe hash table index (returned from the xpfMakeAttrsHashTable function.
3GENERICindexGenerally one set of keys can result in more that one hit. Let index start with 1 and increment until the function returns   XPNULLID in order to handle all of the instances that constitute the match.
4BOOLEANattr(n)Value

The key (attribute) values

Return Value


 

TypeNameComment
INTEGERinstanceIdThe returned instance identifier (that corresponds to the index)

Options


 

Example


  LOCAL
      entityId : GENERIC;
      product_hash_index : INTEGER;
      index : INTEGER;
      s_product : GENERIC;
   END_LOCAL;

    entityId := xpfGetEntity(XPXSOURCEMODELID, 'PRODUCT');
    product_hash_index := xpfMakeAttrsHashTable(XPXSOURCEMODELID, entityId, FALSE, 'PRODUCT_ID');

    index := 1;
    REPEAT WHILE(TRUE);
      s_product := xpfGetAttrsHashedValue(product_hash_index,index,'PROD-ID-1');
      IF(s_product :=: XPXNULLID) THEN
        ESCAPE;
      END_IF;
     (*
        .... handle the found instance here
     *)
      index += 1;
    END_REPEAT;

 

See also

Filter by label

There are no items with the selected labels at this time.

Â