xpxFindStringPatternInAttrHashTable
FUNCTION xpxFindStringPatternInAttrHashTable(modelId : GENERIC; entityId : GENERIC; attributeId : GENERIC; options : INTEGER; maxHitsOfOneStringPattern : INTEGER; VAR index : INTEGER; VAR anyMatchingInstances : BOOLEAN; stringPatternOrCondition1: STRING; matchingInstances1 : LIST OF GENERIC;" stringPatternOrCondition2: STRING; matchingInstances2 : LIST OF GENERIC;" stringPatternOrCondition3: STRING; matchingInstances3 : LIST OF GENERIC;" stringPatternOrCondition4: STRING; matchingInstances4 : LIST OF GENERIC;" stringPatternOrCondition5: STRING; matchingInstances5 : LIST OF GENERIC)" status : INTEGER;
Function to search an EDMpersitentAttrHashTable for strings that matches the given string pattern. This function have variable number of arguments. The legal number of arguments are 9,11,13,15 or 17 arguments.
Arguments
Type | Name | Comment |
---|---|---|
GENERIC | modelId | The actual model to be search. This model must be open. |
GENERIC | entityId | The entityId that together with the "attributeId" argument defines the actual EDMpersistentAttrHashTable to search. |
GENERIC | attributeId | The atttributeId that together with the "entityId" argument defines the actual EDMpersistentAttrHashTable to search. |
INTEGER | options | Optional argument. The default option value is "xpxCASE_SENSITIVE", i.e., all existing string roles will be search for matching the given string pattern by invoking xpfLike() with the option xpxCASE_SENSITIVE set. |
INTEGER | maxHitsOfOneStringPattern | Optional argument. The default value is INDETERMINATE (?), i.e., all specified string roles will be searched before the search operation is terminated. When specified, this argument specifies the maximum hits before the search operation is terminated. The meaning of "maximum hits before the search operation is terminated" may have different interpretation according to the actual given "options" value (xpxSTOP_ON_FIRST_MATCH, xpxSTOP_ONE_ONE_REACHED_MAX_MATCH, xpxSTOP_ON_ALL_REACHED_MAX_MATCH) |
INTEGER | VAR index | Optional argument. Default value is index = 1, i.e., start searching on the first possible string value. When specified, it defines the index of the first string value to be searched. The index of the "last search string value + 1" is returned when the xpxFindStringPatternInModel() operation is terminated. This functionality enables the possibility to perform a search in an iterative way, i.e., the xpxFindStringPatternInModel() function can be called in a loop using the returned "index" value from one invocation as the input "index" value in the next invocation. |
BOOLEAN | VAR anyMatchingInstances | Optional argument. Default value is INDETERMINATE (?). When specified this argument will be set to TRUE when at least one hit is found in the search, else "anyMatchingInstances" will be set to FALSE |
STRING | stringPatternOrCondition1 | This argument can be specified in 4 different ways:
The options xpxEXACT_EQUALS and xpxEXPRESSION_CONDITION are valid for all specified "stringPattern" arguments. Hence a mix of 1 and/or 2+3 and/or 4 is invalid. Only a mix of 2 and 3 are legal in one invocation of the xpxFindStringPatternInAttrHashTable() function.  One xpxFindStringPatternInAttrHashTable() operation can maximum search for 5 string patterns |
LIST OF GENERIC | matchingInstances1 | This argument receives a LIST OF GENERIC with one instanceId for each hits, i.e., the number of elements in this list will be equal to the number of hits for the related "stringPattern" argument. The elements in the returned "matchingInstances" argument, are the instances that have a "matching string value" in the specified "attributeId". |
Return Value
Options
 | Option | Comment |
---|---|---|
1 | XPXCASE_INSENSITIVE | Use case insensitive string comparison in the actual xpfLike() function that implements the actual search operation. |
2 | XPXCASE_SENSITIVE | Use case sensitive string comparison in the actual xpfLike() function that implements the actual search operation. |
3 | xpxEXPRESSION_CONDITION | The specified "stringPatternOrCondition" arguments is specified as an textual EDMexpressX logical expression or an integer expressionId that has been compiled by the xpfDecodeLogicalExpression() or the xpxDecodeLogicalExpression() earlier in the actual EDMvmSession. |
4 | xpxEXACT_EQUALS | Search for equalness only, i.e., search for strings that are identical to the specified "stringPattern". |
5 | xpxSTOP_ON_FIRST_MATCH | The search operation will stop on the first found match. |
6 | xpxSTOP_ONE_ONE_REACHED_MAX_MATCH | The search will stop when the number of hits for at least one search condition is reached the max hits specified in the "maxHitsOfOneStringPattern" argument. This option has no effect when the "maxHitsOfOneStringPattern" argument is not specified. |
7 | xpxSTOP_ON_ALL_REACHED_MAX_MATCH | The search will stop when the number of hits for all given search condition have eached the max hits specified in the "maxHitsOfOneStringPattern" argument. This option has no effect when the "maxHitsOfOneStringPattern" argument is not specified. |
Â
Example
<Missing Example>
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â