xpfConditionalDeleteInstanceTypes


 

FUNCTION xpfConditionalDeleteInstanceTypes(modelId             : GENERIC;
                                            instanceTypesAggrId : AGGREGATE OF GENERIC;
                                            condition           : STRING;
                                            options             : INTEGER)
                                            deletedInstances    : INTEGER; 
                

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.

Arguments


TypeNameComment
GENERICmodelIdSpecifies the actual EDMdataModel to operate on (delete instances from)
AGGREGATE OF GENERICinstanceTypesAggrIdSpecifies the actual instance types (entityId) to operate on. This argument 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.
XPXSUBTYPESAll instances that are subtypes of any of the specified instance types in the 'instanceTypesAggrId' argument, will be included in the actual xpfConditionalDeleteInstanceTypes() operation.

 

Example


<Missing Example>