mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
style: 代码格式更新。
This commit is contained in:
parent
51acb6df3f
commit
6729860e03
@ -234,7 +234,14 @@ public class GlobalConfig {
|
||||
return packageInfoGenerateEnable;
|
||||
}
|
||||
|
||||
public void addCustomConfig(String key, Object value) {
|
||||
public Object getCustomConfig(String key) {
|
||||
if (customConfig != null) {
|
||||
return customConfig.get(key);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setCustomConfig(String key, Object value) {
|
||||
if (customConfig == null) {
|
||||
customConfig = new HashMap<>();
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ public class StrategyConfig {
|
||||
*/
|
||||
private Set<String> unGenerateTables;
|
||||
|
||||
public void addTableConfig(TableConfig tableConfig) {
|
||||
public void setTableConfig(TableConfig tableConfig) {
|
||||
if (tableConfigMap == null) {
|
||||
tableConfigMap = new HashMap<>();
|
||||
}
|
||||
@ -81,19 +81,19 @@ public class StrategyConfig {
|
||||
return tableConfigMap == null ? null : tableConfigMap.get(tableName);
|
||||
}
|
||||
|
||||
public void addColumnConfig(ColumnConfig columnConfig) {
|
||||
public void setColumnConfig(ColumnConfig columnConfig) {
|
||||
if (columnConfigMap == null) {
|
||||
columnConfigMap = new HashMap<>();
|
||||
}
|
||||
columnConfigMap.put(columnConfig.getColumnName(), columnConfig);
|
||||
}
|
||||
|
||||
public void addColumnConfig(String tableName, ColumnConfig columnConfig) {
|
||||
public void setColumnConfig(String tableName, ColumnConfig columnConfig) {
|
||||
TableConfig tableConfig = getTableConfig(tableName);
|
||||
if (tableConfig == null) {
|
||||
tableConfig = new TableConfig();
|
||||
tableConfig.setTableName(tableName);
|
||||
addTableConfig(tableConfig);
|
||||
setTableConfig(tableConfig);
|
||||
}
|
||||
|
||||
tableConfig.addColumnConfig(columnConfig);
|
||||
@ -129,7 +129,7 @@ public class StrategyConfig {
|
||||
return columnConfig;
|
||||
}
|
||||
|
||||
public void addGenerateTable(String... tables) {
|
||||
public void setGenerateTable(String... tables) {
|
||||
if (generateTables == null) {
|
||||
generateTables = new HashSet<>();
|
||||
}
|
||||
@ -141,7 +141,7 @@ public class StrategyConfig {
|
||||
}
|
||||
}
|
||||
|
||||
public void addUnGenerateTable(String... tables) {
|
||||
public void setUnGenerateTable(String... tables) {
|
||||
if (unGenerateTables == null) {
|
||||
unGenerateTables = new HashSet<>();
|
||||
}
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
/**
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.mybatisflex.codegen.generator;
|
||||
|
||||
@ -26,26 +26,26 @@ import com.mybatisflex.codegen.entity.Table;
|
||||
*/
|
||||
public interface IGenerator {
|
||||
|
||||
/**
|
||||
* 获取模板文件位置。
|
||||
*
|
||||
* @return 路径
|
||||
*/
|
||||
String getTemplatePath();
|
||||
/**
|
||||
* 获取模板文件位置。
|
||||
*
|
||||
* @return 路径
|
||||
*/
|
||||
String getTemplatePath();
|
||||
|
||||
/**
|
||||
* 设置模板文件位置。
|
||||
*
|
||||
* @param templatePath
|
||||
*/
|
||||
void setTemplatePath(String templatePath);
|
||||
/**
|
||||
* 设置模板文件位置。
|
||||
*
|
||||
* @param templatePath
|
||||
*/
|
||||
void setTemplatePath(String templatePath);
|
||||
|
||||
/**
|
||||
* 根据模板生成文件。
|
||||
*
|
||||
* @param table 表内容
|
||||
* @param globalConfig 全局配置
|
||||
*/
|
||||
void generate(Table table, GlobalConfig globalConfig);
|
||||
/**
|
||||
* 根据模板生成文件。
|
||||
*
|
||||
* @param table 表内容
|
||||
* @param globalConfig 全局配置
|
||||
*/
|
||||
void generate(Table table, GlobalConfig globalConfig);
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user