コード例 #1
0
        public override void Run(CInputInfo info)
        {
            GetInfo(info);
            string template = "";

            if (language != "JAVA")
            {
                template = "CXMLTemplate.txt";
            }
            else
            {
                template = "JXMLTemplate.txt";
            }
            GeneralClass gc      = new GeneralClass();
            string       content = gc.ReadTemplate(template);
            IDictionary <string, string> list = gc.GetField(sqlPath);

            if (list != null && list.Count > 0)
            {
                content = content.
                          Replace("<%tableCode%>", GetTableCode(list)).
                          Replace("<%tableDescripe%>", gc.GetDescripe(sqlPath)).
                          Replace("<%packageName%>", packageName).
                          Replace("<%className%>", GetTableCode(list) + "Class").
                          Replace("<%resultMap%>", CreateResultMap(list, language)).
                          Replace("<%allColumn%>", CreateAllColumn(list)).
                          Replace("<%create%>", CreateCreateCode(list)).
                          Replace("<%update%>", CreateUpdate(list, language)).
                          Replace("<%primarykey%>", CreatePrimarykey(list)).
                          Replace("<%dynamicWhere%>", CreateDynamicWhere(list)).
                          Replace("<%dynamicScope%>", CreateDynamicScope(list));
                byte[] by = Encoding.Default.GetBytes(content);
                GeneralClass.WriteToFile(savePath + "\\dao\\sqlmap\\" + GetTableCode(list) + ".xml", by);
            }
        }
コード例 #2
0
 public override void OutJFile(IDictionary <string, string> dic, byte[] by)
 {
     GeneralClass.WriteToFile(savePath + "\\service\\" + GeneralClass.GetActionName(dic) + "Service.java", by);
 }
コード例 #3
0
 public override void OutJFile(IDictionary <string, string> dic, byte[] by)
 {
     GeneralClass.WriteToFile(savePath + "\\SqlMap.txt", by, true, true);
 }
コード例 #4
0
ファイル: CreateEntity.cs プロジェクト: Fav/GoldAppleBack
 public override void OutJFile(IDictionary <string, string> dic, byte[] by)
 {
     GeneralClass.WriteToFile(savePath + "\\bean\\" + GetTableCode(dic) + ".java", by);
 }
コード例 #5
0
ファイル: CreateControl.cs プロジェクト: Fav/GoldAppleBack
 public override void OutJFile(IDictionary <string, string> dic, byte[] by)
 {
     GeneralClass.WriteToFile(savePath + "\\controller\\" + GeneralClass.GetActionName(dic) + "Controller.java", by);
 }
コード例 #6
0
 public override void OutJFile(IDictionary <string, string> dic, byte[] by)
 {
     GeneralClass.WriteToFile(savePath + "\\dao\\sqlmap\\" + GeneralClass.GetActionName(dic) + "DaoImpl.java", by);
 }