org.mybatis.generator.config.TableConfiguration.getDomainObjectName()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.mybatis.generator.config.TableConfiguration.getDomainObjectName()方法的一些代码示例,展示了TableConfiguration.getDomainObjectName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableConfiguration.getDomainObjectName()方法的具体详情如下:
包路径:org.mybatis.generator.config.TableConfiguration
类名称:TableConfiguration
方法名:getDomainObjectName

TableConfiguration.getDomainObjectName介绍

暂无

代码示例

代码示例来源:origin: beihaifeiwu/dolphin

@Override
public boolean clientGenerated(Interface interfaze, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
 Set<FullyQualifiedJavaType> importedTypes = new TreeSet<>();
 Method method = new Method(BATCH_UPDATE);
 FullyQualifiedJavaType type = new FullyQualifiedJavaType("java.util.List<" + introspectedTable.getTableConfiguration().getDomainObjectName() + ">");
 method.addParameter(new Parameter(type, "list"));
 method.setReturnType(FullyQualifiedJavaType.getIntInstance());
 importedTypes.add(type);
 interfaze.addMethod(method);
 interfaze.addImportedTypes(importedTypes);
 return true;
}

代码示例来源:origin: beihaifeiwu/dolphin

@Override
public boolean clientGenerated(Interface interfaze, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
 String objectName = introspectedTable.getTableConfiguration().getDomainObjectName();
 Method method = new Method(BATCH_INSERT);
 FullyQualifiedJavaType type = new FullyQualifiedJavaType("java.util.List<" + objectName + ">");
 method.addParameter(new Parameter(type, "list"));
 method.setReturnType(FullyQualifiedJavaType.getIntInstance());
 interfaze.addMethod(method);
 return true;
}

代码示例来源: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

.getSchema() : null,
atn.getTableName(),
tc.getDomainObjectName(),
tc.getAlias(),
isTrue(tc.getProperty(PropertyRegistry.TABLE_IGNORE_QUALIFIERS_AT_RUNTIME)),

代码示例来源:origin: roncoo/roncoo-mybatis-generator

.getSchema() : null,
atn.getTableName(),
tc.getDomainObjectName(),
tc.getAlias(),
isTrue(tc.getProperty(PropertyRegistry.TABLE_IGNORE_QUALIFIERS_AT_RUNTIME)),

代码示例来源:origin: org.mybatis.generator/mybatis-generator-core

stringHasValue(tc.getSchema()) ? atn.getSchema() : null,
atn.getTableName(),
tc.getDomainObjectName(),
tc.getAlias(),
isTrue(tc.getProperty(PropertyRegistry.TABLE_IGNORE_QUALIFIERS_AT_RUNTIME)),

相关文章

微信公众号

最新文章

更多

TableConfiguration类方法