|
@@ -44,9 +44,10 @@ public class CodeGenerator {
|
|
|
private final String targetProjectRootPath;
|
|
|
private final String moduleName;
|
|
|
private final String templateDir = getClass().getResource("/").getPath() + "generator/";
|
|
|
+ private final String isMain;
|
|
|
|
|
|
public CodeGenerator(String oldBasePackage, String newBasePackage, String pdmFile, String tableCode,
|
|
|
- String referenceType, boolean ifUseCustDocDefRef, String author, String targetProjectRootPath) {
|
|
|
+ String referenceType, boolean ifUseCustDocDefRef, String author, String targetProjectRootPath, String isMain) {
|
|
|
this.oldBasePackage = oldBasePackage;
|
|
|
this.newBasePackage = newBasePackage;
|
|
|
this.pdmFile = pdmFile;
|
|
@@ -55,7 +56,7 @@ public class CodeGenerator {
|
|
|
this.ifUseCustDocDefRef = ifUseCustDocDefRef;
|
|
|
this.author = author;
|
|
|
this.targetProjectRootPath = targetProjectRootPath;
|
|
|
-
|
|
|
+ this.isMain = isMain;
|
|
|
moduleName = getModuleNameByTable(tableCode);
|
|
|
|
|
|
final String[] array = {"ID", "DR", "TS", "CREATOR", "CREATION_TIME", "MODIFIER", "MODIFIED_TIME"};
|
|
@@ -163,7 +164,7 @@ public class CodeGenerator {
|
|
|
data.put("ifUseCustDocDefRef", ifUseCustDocDefRef);
|
|
|
data.put("author", author);
|
|
|
data.put("table", table);
|
|
|
-
|
|
|
+ data.put("isMain", isMain);
|
|
|
// 输出文件
|
|
|
String fileName = table.getClassName();
|
|
|
// 文件后缀名
|