-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfweb-partial.mapper-java.cst
More file actions
79 lines (60 loc) · 2.43 KB
/
Copy pathfweb-partial.mapper-java.cst
File metadata and controls
79 lines (60 loc) · 2.43 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<%--
Name:
Author: 成七一
Description: Mybatis Mapper Java GENERATE TEMPLATE FOR FWEB(FOREVER WEB RAPID FRAMEWORK)
CreateTime:2014年7月17日 13:34:46
--%>
<%@ 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="Java" %>
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" 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" %>
/**
* @ <%=Author%> create in <%=System.DateTime.Now%> by Template
* This class generated by Forever Web Rapid Framework Code Generator
*/
package <%=NameSpace%>.mapper.partial;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import <%=NameSpace%>.domain.<%=GetDomainClassName()%>;
/**
* 数据表: [<%=SourceTable.Name%>]
* <%=SourceTable.Description %>
*/
@Repository
public interface Partial<%=GetDomainClassName()%>Mapper {
public void insert(<%=GetDomainClassName()%> <%=GetDomainVariableName()%>);
public void update(<%=GetDomainClassName()%> <%=GetDomainVariableName()%>);
public void delete(String id);
public <%=GetDomainClassName()%> get(String id);
public int getVersion(String id);
public List<<%=GetDomainClassName()%>> getAll();
public int getRowCount();
public List<<%=GetDomainClassName()%>> getAllPaged(@Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);
}
<script runat="template">
public override string GetFileName() {
return GetDomainClassName() + "Mapper.java";
}
public string GetDomainClassName() {
return StringUtil.ToPascalCase(SourceTable.Name.TrimStart("t_".ToCharArray()));
}
public string GetDomainVariableName() {
return StringUtil.ToCamelCase(SourceTable.Name.TrimStart("t_".ToCharArray()));
}
public string GetJavaType(ColumnSchema col) {
try{
return JavaAlias[col.NativeType];
}catch(Exception ex){
return col.NativeType + "[N/A]";
}
}
</script>