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

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

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

TableConfiguration.getProperty介绍

暂无

代码示例

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

public String getTableConfigurationProperty(String property) {
  return tableConfiguration.getProperty(property);
}

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

public String getTableConfigurationProperty(String property) {
  return tableConfiguration.getProperty(property);
}

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

public String getTableConfigurationProperty(String property) {
  return tableConfiguration.getProperty(property);
}

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

public String getTableConfigurationProperty(String property) {
  return tableConfiguration.getProperty(property);
}

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

@Override
  public void initialized(IntrospectedTable introspectedTable) {
    String virtualKey = introspectedTable.getTableConfiguration()
        .getProperty("virtualKeyColumns"); //$NON-NLS-1$

    if (virtualKey != null) {
      StringTokenizer st = new StringTokenizer(virtualKey, ", ", false); //$NON-NLS-1$
      while (st.hasMoreTokens()) {
        String column = st.nextToken();
        introspectedTable.addPrimaryKeyColumn(column);
      }
    }
  }
}

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

@Override
  public void initialized(IntrospectedTable introspectedTable) {
    String virtualKey = introspectedTable.getTableConfiguration()
        .getProperty("virtualKeyColumns"); //$NON-NLS-1$

    if (virtualKey != null) {
      StringTokenizer st = new StringTokenizer(virtualKey, ", ", false); //$NON-NLS-1$
      while (st.hasMoreTokens()) {
        String column = st.nextToken();
        introspectedTable.addPrimaryKeyColumn(column);
      }
    }
  }
}

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

@Override
  public void initialized(IntrospectedTable introspectedTable) {
    String virtualKey = introspectedTable.getTableConfiguration()
        .getProperty("virtualKeyColumns"); //$NON-NLS-1$

    if (virtualKey != null) {
      StringTokenizer st = new StringTokenizer(virtualKey, ", ", false); //$NON-NLS-1$
      while (st.hasMoreTokens()) {
        String column = st.nextToken();
        introspectedTable.addPrimaryKeyColumn(column);
      }
    }
  }
}

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

public BaseRules(IntrospectedTable introspectedTable) {
  super();
  this.introspectedTable = introspectedTable;
  this.tableConfiguration = introspectedTable.getTableConfiguration();
  String modelOnly = tableConfiguration.getProperty(PropertyRegistry.TABLE_MODEL_ONLY);
  isModelOnly = StringUtility.isTrue(modelOnly);
}

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

/**
 * 
 */
public BaseRules(IntrospectedTable introspectedTable) {
  super();
  this.introspectedTable = introspectedTable;
  this.tableConfiguration = introspectedTable.getTableConfiguration();
  String modelOnly = tableConfiguration.getProperty(PropertyRegistry.TABLE_MODEL_ONLY);
  isModelOnly = StringUtility.isTrue(modelOnly);
}

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

/**
 * 
 */
public BaseRules(IntrospectedTable introspectedTable) {
  super();
  this.introspectedTable = introspectedTable;
  this.tableConfiguration = introspectedTable.getTableConfiguration();
  String modelOnly = tableConfiguration.getProperty(PropertyRegistry.TABLE_MODEL_ONLY);
  isModelOnly = StringUtility.isTrue(modelOnly);
}

代码示例来源: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: 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: 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: roncoo/roncoo-mybatis-generator

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);

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

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);

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

if (isTrue(getProperty(PropertyRegistry.TABLE_USE_COLUMN_INDEXES))) {

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

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,
tc.getDomainObjectRenamingRule(),

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

if (isTrue(getProperty(PropertyRegistry.TABLE_USE_COLUMN_INDEXES))) {

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

public void validate(List<String> errors, int listPosition) {
  if (!stringHasValue(tableName)) {
    errors.add(getString("ValidationError.6", Integer.toString(listPosition))); //$NON-NLS-1$
  }
  String fqTableName = composeFullyQualifiedTableName(catalog, schema, tableName, '.');
  if (generatedKey != null) {
    generatedKey.validate(errors, fqTableName);
  }
  if (isTrue(getProperty(PropertyRegistry.TABLE_USE_COLUMN_INDEXES))) {
    // when using column indexes, either both or neither query ids
    // should be set
    if (selectByExampleStatementEnabled && selectByPrimaryKeyStatementEnabled) {
      boolean queryId1Set = stringHasValue(selectByExampleQueryId);
      boolean queryId2Set = stringHasValue(selectByPrimaryKeyQueryId);
      if (queryId1Set != queryId2Set) {
        errors.add(getString("ValidationError.13", //$NON-NLS-1$
            fqTableName));
      }
    }
  }
  if (columnRenamingRule != null) {
    columnRenamingRule.validate(errors, fqTableName);
  }
  for (ColumnOverride columnOverride : columnOverrides) {
    columnOverride.validate(errors, fqTableName);
  }
  for (IgnoredColumn ignoredColumn : ignoredColumns.keySet()) {
    ignoredColumn.validate(errors, fqTableName);
  }
}

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

if (isTrue(getProperty(PropertyRegistry.TABLE_USE_COLUMN_INDEXES))
    && selectByExampleStatementEnabled
    && selectByPrimaryKeyStatementEnabled) {

相关文章

微信公众号

最新文章

更多

TableConfiguration类方法