internal MatchDomainT EnforceT(CheckResultComplexAttributeToColumn checkresult, LL.MDE.DataModels.SimpleRDBMS.Table t) { MatchDomainT match = new MatchDomainT(); LL.MDE.DataModels.SimpleUML.Class c = checkresult.matchDomainC.c; LL.MDE.DataModels.SimpleUML.Attribute a = checkresult.matchDomainC.a; LL.MDE.DataModels.SimpleUML.Class tc = checkresult.matchDomainC.tc; // Contructing t // Return newly binded variables match.t = t; return(match); }
internal static ISet <CheckResultComplexAttributeToColumn> Check(LL.MDE.DataModels.SimpleUML.Class c, string prefix) { ISet <CheckResultComplexAttributeToColumn> result = new HashSet <CheckResultComplexAttributeToColumn>(); ISet <MatchDomainC> matchDomainCs = CheckDomainC(c); foreach (MatchDomainC matchDomainC in matchDomainCs) { LL.MDE.DataModels.SimpleUML.Attribute a = matchDomainC.a; string an = matchDomainC.an; LL.MDE.DataModels.SimpleUML.Class tc = matchDomainC.tc; CheckResultComplexAttributeToColumn checkonlysMatch = new CheckResultComplexAttributeToColumn() { matchDomainC = matchDomainC, }; result.Add(checkonlysMatch); } // End foreach return(result); }
internal MatchDomainT EnforceT(CheckResultPrimitiveAttributeToColumn checkresult, string sqltype, string cn, LL.MDE.DataModels.SimpleRDBMS.Table t) { MatchDomainT match = new MatchDomainT(); LL.MDE.DataModels.SimpleUML.Class c = checkresult.matchDomainC.c; LL.MDE.DataModels.SimpleUML.Attribute a = checkresult.matchDomainC.a; LL.MDE.DataModels.SimpleUML.PrimitiveDataType p = checkresult.matchDomainC.p; // Contructing t LL.MDE.DataModels.SimpleRDBMS.Column cl = null; cl = (LL.MDE.DataModels.SimpleRDBMS.Column)editor.CreateNewObjectInField(t, "column"); // Contructing cl editor.AddOrSetInField(cl, "type", sqltype); editor.AddOrSetInField(cl, "name", cn); // Return newly binded variables match.t = t; match.cl = cl; return(match); }
internal void Enforce(ISet <CheckResultComplexAttributeToColumn> result, LL.MDE.DataModels.SimpleRDBMS.Table t, string prefix) { foreach (CheckResultComplexAttributeToColumn match in result) { // Extracting variables binded in source domains LL.MDE.DataModels.SimpleUML.Class c = match.matchDomainC.c; LL.MDE.DataModels.SimpleUML.Attribute a = match.matchDomainC.a; string an = match.matchDomainC.an; LL.MDE.DataModels.SimpleUML.Class tc = match.matchDomainC.tc; // Assigning variables binded in the where clause string newprefix = prefix + "_" + an; // Enforcing each enforced domain MatchDomainT targetMatchDomainT = EnforceT(match, t); // Retrieving variables binded in the enforced domains // Calling other relations as defined in the where clause transformation.RelationAttributeToColumn.CheckAndEnforce(tc, t, newprefix); } }
internal void Enforce(ISet <CheckResultPrimitiveAttributeToColumn> result, LL.MDE.DataModels.SimpleRDBMS.Table t, string prefix) { foreach (CheckResultPrimitiveAttributeToColumn match in result) { // Extracting variables binded in source domains LL.MDE.DataModels.SimpleUML.Class c = match.matchDomainC.c; LL.MDE.DataModels.SimpleUML.Attribute a = match.matchDomainC.a; string an = match.matchDomainC.an; LL.MDE.DataModels.SimpleUML.PrimitiveDataType p = match.matchDomainC.p; string pn = match.matchDomainC.pn; // Assigning variables binded in the where clause string cn = ((prefix == "") ? an : prefix + '_' + an); string sqltype = transformation.Functions.PrimitiveTypeToSqlType(pn); // Enforcing each enforced domain MatchDomainT targetMatchDomainT = EnforceT(match, sqltype, cn, t); // Retrieving variables binded in the enforced domains LL.MDE.DataModels.SimpleRDBMS.Column cl = targetMatchDomainT.cl; // Calling other relations as defined in the where clause } }