FUNCTION xpxFindStringPatternInModel(modelId : GENERIC; options : INTEGER; maxHitsOfOneStringPattern : INTEGER; includeOrExcludeInstanceTypeFilter : SET OF GENERIC; VAR index : INTEGER; VAR anyMatchingInstances : BOOLEAN; stringPattern1: STRING; VAR matchingInstances1, VAR matchingAttributes1 : LIST OF GENERIC; stringPattern2: STRING; VAR matchingInstances2, VAR matchingAttributes2 : LIST OF GENERIC; stringPattern3: STRING; VAR matchingInstances3, VAR matchingAttributes3 : LIST OF GENERIC; stringPattern4: STRING; VAR matchingInstances4, VAR matchingAttributes4 : LIST OF GENERIC; stringPattern5: STRING; VAR matchingInstances5, VAR matchingAttributes5 : LIST OF GENERIC) status : INTEGER;
Function to search all STRING data types in model for one or more specified string pattern. This function must have 8,11,14,17 or 20 arguments. The 4 set of optional arguments (stringPattern2, matchingInstances2, matchingAttributes2), (stringPattern3, matchingInstances3, matchingAttributes3), (stringPattern4, matchingInstances4, matchingAttributes4) and (stringPattern5, matchingInstances5, matchingAttributes5) can be used to specify 4 more string patterns to search for.
Arguments
Type | Name | Comment |
---|---|---|
GENERIC | modelId | The actual model to be search |
INTEGER | options | This argument can be specified as INDETERMINATE ("?"). The default option value is XPXSEARCH_INSTANCES ~| XPXSEARCH_SIMPLE_ATTRIBUTES ~| XPXSEARCH_AGGREGATES ~| XPXCASE_SENSITIVE |
INTEGER | maxHitsOfOneStringPattern | The search operation will be terminated when one of the specified search criteria is fulfilled "maxHitsOfOneStringPattern" times. |
SET OF GENERIC | includeOrExcludeInstanceTypeFilter | This argument is valid when one of the options XPXEXCLUDE_FILER or XPXINCLUDE_FILTER is set and should contain a SET OF ENTITY_DEFINITION, i.e., a set of instance type definitions. When XPXEXCLUDE_FILTER is set, the argument "includeOrExcludeInstanceTypeFilter" specifies what instance types should not be search for the actual string pattern(s). When XPXINCLUDE_FILTER is set, he argument "includeOrExcludeInstanceTypeFilter" specifies what instance types should be search for the actual string pattern(s). This argument may be specified as INDETERMINATE ("?")
|
INTEGER | VAR index | This is both an IN and OUT value that represent a search cursor in the model. The IN value specifies where to start the current search. "index" = 1 means search from start of model, the OUT value specifies the cursor of the last match, i.e., when doing iterative searches, the next IN value of "index" should be the value of the "returned index in the previous search + 1"
|
BOOLEAN | VAR anyMatchingInstances | TRUE when at least one matching instance is found. FALSE when no match is found. This argument can be set to indeterminate |
STRING | stringPattern1 | The string pattern to search for. The format of this string pattern is as specified by the EXPRESS LIKE operator. The stringPattern1 argument can contain more string patterns with logical operators in between each operand (stringPattern) Example1: 'Like (''pattern'')' Example2: '((LIKE(''pattern1'')) AND (NOT(LIKE(''pattern2''))))' |
LIST OF GENERIC | VAR matchingInstances1 | The InstanceId of the instances matching the "stringPattern1" search criteria will returned in this LIST aggregate. The same InstanceId may occur more times in the "matchingInstances1" LIST because the actual string pattern may be found in more attributes of the same instance. |
LIST OF GENERIC | VAR matchingAttributes1 | The attributeId that holds the actual string pattern will be returned in this LIST aggregate. Independent of how many occurrences of the actual pattern is found in an attribute, only one occurrence of the actual attributeId will be stored in the "matchingAttributes1" LIST aggregate. Hence this aggregate is a LIST OF UNIQUE GENERIC. An element with the same index in the "matchingInstances1" aggregate and the "matchingAttributes1" aggregate gives the "InstanceId.AttributeId" of the matching string. When an AttributeID is an aggregate, the actual aggregate must be search to find the element(s) holding the actual string pattern. The function xpfAggrLike() is suitable for this operation. |
Return Value
Options
Option | Comment |
---|---|
XPXSEARCH_INSTANCES | Search all standard entity instances in model |
XPXSEARCH_SIMPLE_ATTRIBUTES | Simple attributes will be search |
XPXSEARCH_AGGREGATES | Aggregates will be search |
XPXSEARCH_TABLE_INSTANCES | |
XPXSEARCH_USER_DEFINED_ENTITIES | |
XPXCASE_INSENSITIVE | |
XPXCASE_SENSITIVE | |
XPXINCLUDE_FILTER | |
XPXEXCLUDE_FILTER |
Example
<Missing Example>
See also
Filter by label
There are no items with the selected labels at this time.