...
Description:
Code Block | ||||
---|---|---|---|---|
| ||||
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
...
Type | Name | Comment | |
GENERIC | modelId | Only effective when the option XPXDELETE_ALL_MATCHING_INSTACNES_IN_MODEL is enabled. | |
AGGREGATE OF GENERIC | instancesAggrId | May be an 'EntityExtent.instances' aggregate or any other aggregate. This has no effect hen the option XPXDELETE_ALL_MATCHING_INSTACNES_IN_MODEL is enabled | |
STRING | condition | An 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. | |
INTEGER | options | Options for the function
Return Value
...
Type | Name | Comment |
INTEGER | deletedInstances | Number of deleted instances |
Options
...
...
Option | Comment |
XPXDELETE_ALL_MATCHING_INSTACNES_IN_MODEL | All instances in the specified model 'modelId' that matches the specified options and the optional 'condition', will be deleted. |
XPXDELETE_INSTANCES_REFERENCING_NO_OTHER_INSTANCES | Only instances that do not use any other instances in any roles, will be deleted |
XPXDELETE_INSTANCES_AND_REFERENCES | Use the xpxDeleteInstanceAndReferences() instead of xpxDeleteInstance() method in the actual "delete instance" operation. |
EXAMPLE
Example
...
Code Block | ||
---|---|---|
| ||
<Missing Example> |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|
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:
...