本文整理汇总了Java中org.mybatis.generator.api.dom.java.JavaReservedWords类的典型用法代码示例。如果您正苦于以下问题:Java JavaReservedWords类的具体用法?Java JavaReservedWords怎么用?Java JavaReservedWords使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JavaReservedWords类属于org.mybatis.generator.api.dom.java包,在下文中一共展示了JavaReservedWords类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: reportIntrospectionWarnings
import org.mybatis.generator.api.dom.java.JavaReservedWords; //导入依赖的package包/类
/**
* Report introspection warnings.
*
* @param introspectedTable
* the introspected table
* @param tableConfiguration
* the table configuration
* @param table
* the table
*/
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()));
}
}
for (IntrospectedColumn ic : introspectedTable.getAllColumns()) {
if (JavaReservedWords.containsWord(ic.getJavaProperty())) {
warnings.add(getString("Warning.26", //$NON-NLS-1$
ic.getActualColumnName(), table.toString()));
}
}
}
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:50,代码来源:DatabaseIntrospector.java
注:本文中的org.mybatis.generator.api.dom.java.JavaReservedWords类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论