Repository navigation
Expand file tree
/
Copy pathfweb-mapper-java-all.cst
More file actions
42 lines (36 loc) · 1.66 KB
/
Copy pathfweb-mapper-java-all.cst
File metadata and controls
42 lines (36 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<%--
Name:
Author: 成七一
Description: Mybatis Mapper XML GENERATE TEMPLATE FOR FWEB(FOREVER WEB RAPID FRAMEWORK)
--%>
<%@ Assembly Name="System.Data" %>
<%@ Import Namespace="System.Data" %>
<%@ Assembly Name="SchemaExplorer" %>
<%@ Import Namespace="SchemaExplorer" %>
<%@ Assembly Name="System" %>
<%@ Import Namespace="System" %>
<%@ Map Name="JavaAlias" Src="mysql-java-alias" %>
<%@ Template Language="C#" TargetLanguage="Text" %>
<%@ Property Name="SourceTables" Optional="True" Type="SchemaExplorer.TableSchemaCollection" Category="Database" Description="可以选择多张表." %>
<%@ Property Name="NameSpace" Type="System.String" Category="Context" Default="org.hhwy.rdc.fweb1" %>
<%@ Property Name="Author" Type="System.String" Category="Context" Default="cqiyi" %>
<%@ Property Name="OutputDirectory" Type="System.String" Category="Context" Default=".\mapper.java" %>
<%@ Register Name="Mapper" Template="fweb-mapper-java.cst" MergeProperties="False" ExcludeProperties="" %>
<%
output();
%>
<script runat="template">
public void output() {
foreach(TableSchema table in SourceTables)
{
String fileName = OutputDirectory + "\\" + StringUtil.ToPascalCase(table.Name.TrimStart("t_".ToCharArray())) + "Mapper.java";
this.Response.WriteLine(new System.IO.FileInfo(fileName).FullName + "...");
Mapper mapper = this.Create<Mapper>();
mapper.SourceTable = table;
mapper.Author = Author;
mapper.NameSpace = NameSpace;
mapper.RenderToFile(fileName, true);
}
this.Response.WriteLine("\r\nTotal " + SourceTables.Count + " generated successfull.");
}
</script>