Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description: 

Code Block
languagecpp
themeConfluence
FUNCTION xpfConditionalDeleteInstances(modelId          : GENERIC;
                                        instancesAggrId  : AGGREGATE OF GENERIC;
                                        condition        : STRING;
                                        options          : INTEGER)
                                        deletedInstances : INTEGER;
                

This function deletes "all instances in the given 'instancesAggrId' argument that matches the actual specified 'options, and the optional given 'condition' argument.   When no 'expression' is defined and no options is specified, the function will be similar to performing xpxDeleteInstance() on each element in the 'instancesAggrId' argument.    The function value is the "number of instances deleted in the operation".    
Signature:
FUNCTION xpfConditionalDeleteInstances(modelId          : GENERIC;
                                       instancesAggrId  : AGGREGATE OF GENERIC;
                                       condition        : STRING;
                                       options          : INTEGER)
                                       deletedInstances : INTEGER;
Arguments:

Arguments

...

Options for the function
TypeNameComment
GENERICmodelIdOnly effective when the option XPXDELETE_ALL_MATCHING_INSTACNES_IN_MODEL is enabled.
AGGREGATE OF GENERICinstancesAggrIdMay be an 'EntityExtent.instances' aggregate or any other aggregate. This has no effect hen the option XPXDELETE_ALL_MATCHING_INSTACNES_IN_MODEL is enabled
STRINGconditionAn logical EDMexpressX expression that will be evaluated for all "specified" instances. Only those instances that pass the 'condition' and match the specified options, will be deleted.
INTEGERoptions 

Return Value

...

 

TypeNameComment
INTEGERdeletedInstancesNumber of deleted instances

Options

...

...

OptionComment
XPXDELETE_ALL_MATCHING_INSTACNES_IN_MODELAll instances in the specified model 'modelId' that matches the specified options and the optional 'condition', will be deleted.
XPXDELETE_INSTANCES_REFERENCING_NO_OTHER_INSTANCESOnly instances that do not use any other instances in any roles, will be deleted
XPXDELETE_INSTANCES_AND_REFERENCESUse the xpxDeleteInstanceAndReferences() instead of xpxDeleteInstance() method in the actual "delete instance" operation.

 
EXAMPLE

Example

...

Code Block
languagecpp
<Missing Example>

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "extension_schema" and parent = "5636522"

  
Description:
This function deletes "all instances of the instance type(s) specified in 'instanceTypesAggrId' argument that matches the actual specified 'options, and the optional given 'condition' argument.
   The function value is the "number of instances deleted in the operation".
   The argument 'modelId' .
   The argument 'instanceTypesAggrId'
   The optional 'condition' argument
  
Signature:
FUNCTION xpfConditionalDeleteInstanceTypes(modelId             : GENERIC;
                                           instanceTypesAggrId : AGGREGATE OF GENERIC;
                                           condition           : STRING;
                                           options             : INTEGER)
                                           deletedInstances    : INTEGER; 
Arguments:

...