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

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

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

TableConfiguration.getColumnOverrides介绍

暂无

代码示例

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

private void reportIntrospectionWarnings(IntrospectedTable introspectedTable,
    TableConfiguration tableConfiguration, FullyQualifiedTable table) {
  // make sure that every column listed in column overrides
  // actually exists in the table
  for (ColumnOverride columnOverride : tableConfiguration.getColumnOverrides()) {
    if (introspectedTable.getColumn(columnOverride.getColumnName()) == null) {
      warnings.add(getString("Warning.3", //$NON-NLS-1$
          columnOverride.getColumnName(), table.toString()));
    }
  }
  // make sure that every column listed in ignored columns
  // actually exists in the table
  for (String string : tableConfiguration.getIgnoredColumnsInError()) {
    warnings.add(getString("Warning.4", //$NON-NLS-1$
        string, table.toString()));
  }
  GeneratedKey generatedKey = tableConfiguration.getGeneratedKey();
  if (generatedKey != null && introspectedTable.getColumn(generatedKey.getColumn()) == null) {
    if (generatedKey.isIdentity()) {
      warnings.add(getString("Warning.5", //$NON-NLS-1$
          generatedKey.getColumn(), table.toString()));
    } else {
      warnings.add(getString("Warning.6", //$NON-NLS-1$
          generatedKey.getColumn(), table.toString()));
    }
  }
}

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

private void reportIntrospectionWarnings(
    IntrospectedTable introspectedTable,
    TableConfiguration tableConfiguration, FullyQualifiedTable table) {
  // make sure that every column listed in column overrides
  // actually exists in the table
  for (ColumnOverride columnOverride : tableConfiguration
      .getColumnOverrides()) {
    if (introspectedTable.getColumn(columnOverride.getColumnName()) == null) {
      warnings.add(getString("Warning.3", //$NON-NLS-1$
          columnOverride.getColumnName(), table.toString()));
    }
  }
  // make sure that every column listed in ignored columns
  // actually exists in the table
  for (String string : tableConfiguration.getIgnoredColumnsInError()) {
    warnings.add(getString("Warning.4", //$NON-NLS-1$
        string, table.toString()));
  }
  GeneratedKey generatedKey = tableConfiguration.getGeneratedKey();
  if (generatedKey != null
      && introspectedTable.getColumn(generatedKey.getColumn()) == null) {
    if (generatedKey.isIdentity()) {
      warnings.add(getString("Warning.5", //$NON-NLS-1$
          generatedKey.getColumn(), table.toString()));
    } else {
      warnings.add(getString("Warning.6", //$NON-NLS-1$
          generatedKey.getColumn(), table.toString()));
    }
  }
}

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

private void reportIntrospectionWarnings(
    IntrospectedTable introspectedTable,
    TableConfiguration tableConfiguration, FullyQualifiedTable table) {
  // make sure that every column listed in column overrides
  // actually exists in the table
  for (ColumnOverride columnOverride : tableConfiguration
      .getColumnOverrides()) {
    if (introspectedTable.getColumn(columnOverride.getColumnName()) == null) {
      warnings.add(getString("Warning.3", //$NON-NLS-1$
          columnOverride.getColumnName(), table.toString()));
    }
  }
  // make sure that every column listed in ignored columns
  // actually exists in the table
  for (String string : tableConfiguration.getIgnoredColumnsInError()) {
    warnings.add(getString("Warning.4", //$NON-NLS-1$
        string, table.toString()));
  }
  GeneratedKey generatedKey = tableConfiguration.getGeneratedKey();
  if (generatedKey != null
      && introspectedTable.getColumn(generatedKey.getColumn()) == null) {
    if (generatedKey.isIdentity()) {
      warnings.add(getString("Warning.5", //$NON-NLS-1$
          generatedKey.getColumn(), table.toString()));
    } else {
      warnings.add(getString("Warning.6", //$NON-NLS-1$
          generatedKey.getColumn(), table.toString()));
    }
  }
}

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

.getColumnOverrides()) {
if (introspectedTable.getColumn(columnOverride.getColumnName()) == null) {
  warnings.add(getString("Warning.3", //$NON-NLS-1$

相关文章

微信公众号

最新文章

更多

TableConfiguration类方法