本文整理了Java中org.mybatis.generator.config.TableConfiguration.getTableName()
方法的一些代码示例,展示了TableConfiguration.getTableName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableConfiguration.getTableName()
方法的具体详情如下:
包路径:org.mybatis.generator.config.TableConfiguration
类名称:TableConfiguration
方法名:getTableName
暂无
代码示例来源:origin: beihaifeiwu/dolphin
public String fetchTypeName(IntrospectedColumn introspectedColumn){
String columnName = introspectedColumn.getActualColumnName();
String catalog = introspectedColumn.getIntrospectedTable().getTableConfiguration().getCatalog();
String schema = introspectedColumn.getIntrospectedTable().getTableConfiguration().getSchema();
String table = introspectedColumn.getIntrospectedTable().getTableConfiguration().getTableName();
String dataType = null;
try {
ResultSet set = connection.getMetaData().getColumns(catalog, schema, table, columnName);
while(set.next()){
dataType = set.getString("TYPE_NAME");
}
} catch (SQLException e) {
e.printStackTrace();
}
return dataType;
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
|| stringContainsSpace(tc.getCatalog())
|| stringContainsSpace(tc.getSchema())
|| stringContainsSpace(tc.getTableName());
localTableName = tc.getTableName();
} else if (databaseMetaData.storesLowerCaseIdentifiers()) {
localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()
localSchema = tc.getSchema() == null ? null : tc.getSchema()
.toLowerCase();
localTableName = tc.getTableName() == null ? null : tc
.getTableName().toLowerCase();
} else if (databaseMetaData.storesUpperCaseIdentifiers()) {
localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()
localSchema = tc.getSchema() == null ? null : tc.getSchema()
.toUpperCase();
localTableName = tc.getTableName() == null ? null : tc
.getTableName().toUpperCase();
} else {
localCatalog = tc.getCatalog();
localSchema = tc.getSchema();
localTableName = tc.getTableName();
.getSchema(), tc.getTableName());
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
|| stringContainsSpace(tc.getCatalog())
|| stringContainsSpace(tc.getSchema())
|| stringContainsSpace(tc.getTableName());
localTableName = tc.getTableName();
} else if (databaseMetaData.storesLowerCaseIdentifiers()) {
localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()
localSchema = tc.getSchema() == null ? null : tc.getSchema()
.toLowerCase();
localTableName = tc.getTableName() == null ? null : tc
.getTableName().toLowerCase();
} else if (databaseMetaData.storesUpperCaseIdentifiers()) {
localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()
localSchema = tc.getSchema() == null ? null : tc.getSchema()
.toUpperCase();
localTableName = tc.getTableName() == null ? null : tc
.getTableName().toUpperCase();
} else {
localCatalog = tc.getCatalog();
localSchema = tc.getSchema();
localTableName = tc.getTableName();
.getSchema(), tc.getTableName());
代码示例来源:origin: handosme/mybatis-generator-plus
|| stringContainsSpace(tc.getCatalog())
|| stringContainsSpace(tc.getSchema())
|| stringContainsSpace(tc.getTableName());
localTableName = tc.getTableName();
} else if (databaseMetaData.storesLowerCaseIdentifiers()) {
localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()
localSchema = tc.getSchema() == null ? null : tc.getSchema()
.toLowerCase();
localTableName = tc.getTableName() == null ? null : tc
.getTableName().toLowerCase();
} else if (databaseMetaData.storesUpperCaseIdentifiers()) {
localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()
localSchema = tc.getSchema() == null ? null : tc.getSchema()
.toUpperCase();
localTableName = tc.getTableName() == null ? null : tc
.getTableName().toUpperCase();
} else {
localCatalog = tc.getCatalog();
localSchema = tc.getSchema();
localTableName = tc.getTableName();
.getSchema(), tc.getTableName());
代码示例来源:origin: cxjava/mybatis-generator-core
|| stringContainsSpace(tc.getSchema()) || stringContainsSpace(tc.getTableName());
localTableName = tc.getTableName();
} else if (databaseMetaData.storesLowerCaseIdentifiers()) {
localCatalog = tc.getCatalog() == null ? null : tc.getCatalog().toLowerCase();
localSchema = tc.getSchema() == null ? null : tc.getSchema().toLowerCase();
localTableName = tc.getTableName() == null ? null : tc.getTableName().toLowerCase();
} else if (databaseMetaData.storesUpperCaseIdentifiers()) {
localCatalog = tc.getCatalog() == null ? null : tc.getCatalog().toUpperCase();
localSchema = tc.getSchema() == null ? null : tc.getSchema().toUpperCase();
localTableName = tc.getTableName() == null ? null : tc.getTableName().toUpperCase();
} else {
localCatalog = tc.getCatalog();
localSchema = tc.getSchema();
localTableName = tc.getTableName();
ResultSet rs3 = s.executeQuery(this.getClumnRemark(tc.getTableName(),rs.getString("COLUMN_NAME")));
while (rs3.next()) {
remarks = rs3.getString("VALUE");
ActualTableName inputAtn = new ActualTableName(tc.getCatalog(), tc.getSchema(), tc.getTableName());
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
.getSchema(), tc.getTableName(), '.');
代码示例来源:origin: cxjava/mybatis-generator-core
tc.getSchema(), tc.getTableName()));
return null;
代码示例来源:origin: com.github.hongframework/hframe-webgenerator
public static void generator(String mybatisConfigFile, String companyCode, String programCode, String moduleCode) throws Exception {
List<TableConfiguration> tableConfigurations = MyBatisGeneratorUtil.getTableCfg(new File(mybatisConfigFile));
for (TableConfiguration tableConfiguration : tableConfigurations) {
Table table = new Table();
table.setTableName(tableConfiguration.getTableName());
table.setTableDesc(tableConfiguration.getProperty("chineseName"));
table.setParentId(tableConfiguration.getProperty("parentId"));
table.setDbId(tableConfiguration.getGeneratedKey().getColumn());
serviceGenerate(companyCode, programCode, moduleCode, table);
controllerGenerate(companyCode,programCode, moduleCode, table);
}
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
tc.getSchema(), tc.getTableName()));
return null;
代码示例来源:origin: handosme/mybatis-generator-plus
tc.getSchema(), tc.getTableName()));
return null;
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
tc.getSchema(), tc.getTableName()));
return null;
代码示例来源:origin: handosme/mybatis-generator-plus
String tableName = composeFullyQualifiedTableName(tc.getCatalog(), tc.getSchema(), tc.getTableName(), '.');
代码示例来源:origin: cxjava/mybatis-generator-core
String tableName = composeFullyQualifiedTableName(tc.getCatalog(), tc.getSchema(), tc.getTableName(),
'.');
代码示例来源:origin: roncoo/roncoo-mybatis-generator
.getSchema(), tc.getTableName(), '.');
代码示例来源:origin: com.github.hongframework/hframe-webgenerator
public static void generator() throws Exception {
List<TableConfiguration> tableConfigurations = MyBatisGeneratorUtil.getTableCfg();
for (TableConfiguration tableConfiguration : tableConfigurations) {
Table table = new Table();
table.setTableName(tableConfiguration.getTableName());
table.setTableDesc(tableConfiguration.getProperty("chineseName"));
table.setParentId(tableConfiguration.getProperty("parentId"));
serviceGenerate("", "hframe", "hframe", table);
controllerGenerate("", "hframe", "hframe", table);
}
}
代码示例来源:origin: cxjava/mybatis-generator-core
private List<IntrospectedTable> calculateIntrospectedTables(TableConfiguration tc,
Map<ActualTableName, List<IntrospectedColumn>> columns) {
boolean delimitIdentifiers = tc.isDelimitIdentifiers() || stringContainsSpace(tc.getCatalog())
|| stringContainsSpace(tc.getSchema()) || stringContainsSpace(tc.getTableName());
List<IntrospectedTable> answer = new ArrayList<IntrospectedTable>();
for (Map.Entry<ActualTableName, List<IntrospectedColumn>> entry : columns.entrySet()) {
ActualTableName atn = entry.getKey();
// we only use the returned catalog and schema if something was
// actually
// specified on the table configuration. If something was returned
// from the DB for these fields, but nothing was specified on the
// table
// configuration, then some sort of DB default is being returned
// and we don't want that in our SQL
FullyQualifiedTable table = new FullyQualifiedTable(stringHasValue(tc.getCatalog()) ? atn.getCatalog()
: null, stringHasValue(tc.getSchema()) ? atn.getSchema() : null, atn.getTableName(),
tc.getDomainObjectName(), tc.getAlias(),
isTrue(tc.getProperty(PropertyRegistry.TABLE_IGNORE_QUALIFIERS_AT_RUNTIME)),
tc.getProperty(PropertyRegistry.TABLE_RUNTIME_CATALOG),
tc.getProperty(PropertyRegistry.TABLE_RUNTIME_SCHEMA),
tc.getProperty(PropertyRegistry.TABLE_RUNTIME_TABLE_NAME), delimitIdentifiers, context);
IntrospectedTable introspectedTable = ObjectFactory.createIntrospectedTable(tc, table, context);
for (IntrospectedColumn introspectedColumn : entry.getValue()) {
introspectedTable.addColumn(introspectedColumn);
}
calculatePrimaryKey(table, introspectedTable);
answer.add(introspectedTable);
}
return answer;
}
代码示例来源:origin: handosme/mybatis-generator-plus
|| stringContainsSpace(tc.getCatalog())
|| stringContainsSpace(tc.getSchema())
|| stringContainsSpace(tc.getTableName());
代码示例来源:origin: roncoo/roncoo-mybatis-generator
|| stringContainsSpace(tc.getCatalog())
|| stringContainsSpace(tc.getSchema())
|| stringContainsSpace(tc.getTableName());
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
|| stringContainsSpace(tc.getCatalog())
|| stringContainsSpace(tc.getSchema())
|| stringContainsSpace(tc.getTableName());
内容来源于网络,如有侵权,请联系作者删除!