|
FUNCTION acyclic_product_relationship (relation : product_relationship, relatives : SET [1:?] OF product, specific_relation : STRING) : BOOLEAN; LOCAL x : SET OF product_relationship ; END_LOCAL ; IF relation . relating_product IN relatives THEN RETURN ( FALSE ) ; END_IF ; x := QUERY ( prod <* bag_to_set ( USEDIN ( relation . relating_product , 'product_definition_schema.' + 'product_relationship.' + 'related_product' ) ) | specific_relation IN TYPEOF ( prod ) ) ; REPEAT i := 1 TO HIINDEX ( x ) ; IF NOT acyclic_product_relationship ( x [ i ] , relatives + relation . relating_product , specific_relation ) THEN RETURN ( FALSE ) ; END_IF ; END_REPEAT ; RETURN ( TRUE ) ; END_FUNCTION; -- acyclic_product_relationship |
|
public class FAcyclic_product_relationship public static Value run(SdaiContext _context, Value relation, Value relatives, Value specific_relation) |