Beispiel #1
0
        internal MatchDomainT EnforceT(CheckResultClassToTable checkresult, 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.Package p = checkresult.matchDomainC.p;

            // Querying when relations and storing results //var RelationPackageToSchemaResult =  transformation.RelationPackageToSchema.FindPreviousResult(p) ;

            // Contructing t
            editor.AddOrSetInField(t, "name", cn);
            LL.MDE.DataModels.SimpleRDBMS.Schema s = null;
            s = (LL.MDE.DataModels.SimpleRDBMS.Schema)editor.CreateNewObjectInField(t, "schema");

            LL.MDE.DataModels.SimpleRDBMS.Key k = null;
            k = (LL.MDE.DataModels.SimpleRDBMS.Key)editor.CreateNewObjectInField(t, "key");

            // Contructing s

            // Contructing k
            editor.AddOrSetInField(k, "name", cn + "_pk");
            LL.MDE.DataModels.SimpleRDBMS.Column cl = null;
            cl = (LL.MDE.DataModels.SimpleRDBMS.Column)editor.CreateNewObjectInField(k, "column");

            // Contructing cl
            editor.AddOrSetInField(cl, "type", "NUMBER");
            editor.AddOrSetInField(cl, "name", cn + "tid");
            editor.AddOrSetInField(cl, "owner", t);
            // Setting cycling properties
            editor.AddOrSetInField(t, "column", cl);

            // Return newly binded variables
            match.t  = t;
            match.s  = s;
            match.k  = k;
            match.cl = cl;
            return(match);
        }
        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 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);
        }