public static Dependency createDependency( IDependable master, IDependable dependent, Relations.Relation relation, DependencyTypeEnum dependencyType ) { Dependency d = new Dependency(); d.master = master; d.dependent = dependent; d.relation = relation; d.dependencyType = dependencyType; // тут надо проверить, что эти объекты и правда соответствуют этому relation string val1 = master.entityType.ToLower(); string val2 = dependent.entityType.ToLower(); string val3 = relation.A.targetClassName.ToLower(); string val4 = relation.B.targetClassName.ToLower(); bool fit_1 = (val1 == val3) && (val2 == val4); bool fit_2 = (val1 == val4) && (val2 == val3); bool fit = fit_1 || fit_2; if (fit) { items.Add(d); return(d); } else { fn.dp("ERROR creation dependency: objects don't fit relation"); return(null); } }
public List <IUniversalRowDataContainer> makeGroupQuery(IKeeper keeper, Lib.GroupQueryTypeEnum groupQueryType, Relations.Relation targetRelation, string targetField) { return(null); }
public void registerRelation(Relations.Relation rel) { relations.Add(rel); }
public List <IUniversalRowDataContainer> makeGroupQuery(IKeeper keeper, Lib.GroupQueryTypeEnum groupQueryType, Relations.Relation targetRelation, string targetField) { return(actualCluster.makeGroupQuery(keeper, groupQueryType, targetRelation, targetField)); }