本文整理汇总了Java中org.mybatis.generator.internal.ObjectFactory.createIntrospectedTableForValidation方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectFactory.createIntrospectedTableForValidation方法的具体用法?Java ObjectFactory.createIntrospectedTableForValidation怎么用?Java ObjectFactory.createIntrospectedTableForValidation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mybatis.generator.internal.ObjectFactory
的用法示例。
在下文中一共展示了ObjectFactory.createIntrospectedTableForValidation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* This method does a simple validate, it makes sure that all required fields have been filled in. It does not do
* any more complex operations such as validating that database tables exist or validating that named columns exist
*
* @param errors
* the errors
*/
public void validate(List<String> errors) {
if (!stringHasValue(id)) {
errors.add(getString("ValidationError.16")); //$NON-NLS-1$
}
if (jdbcConnectionConfiguration == null && connectionFactoryConfiguration == null) {
// must specify one
errors.add(getString("ValidationError.10", id)); //$NON-NLS-1$
} else if (jdbcConnectionConfiguration != null && connectionFactoryConfiguration != null) {
// must not specify both
errors.add(getString("ValidationError.10", id)); //$NON-NLS-1$
} else if (jdbcConnectionConfiguration != null) {
jdbcConnectionConfiguration.validate(errors);
} else {
connectionFactoryConfiguration.validate(errors);
}
if (javaModelGeneratorConfiguration == null) {
errors.add(getString("ValidationError.8", id)); //$NON-NLS-1$
} else {
javaModelGeneratorConfiguration.validate(errors, id);
}
if (javaClientGeneratorConfiguration != null) {
javaClientGeneratorConfiguration.validate(errors, id);
}
IntrospectedTable it = null;
try {
it = ObjectFactory.createIntrospectedTableForValidation(this);
} catch (Exception e) {
errors.add(getString("ValidationError.25", id)); //$NON-NLS-1$
}
if (it != null && it.requiresXMLGenerator()) {
if (sqlMapGeneratorConfiguration == null) {
errors.add(getString("ValidationError.9", id)); //$NON-NLS-1$
} else {
sqlMapGeneratorConfiguration.validate(errors, id);
}
}
if (tableConfigurations.size() == 0) {
errors.add(getString("ValidationError.3", id)); //$NON-NLS-1$
} else {
for (int i = 0; i < tableConfigurations.size(); i++) {
TableConfiguration tc = tableConfigurations.get(i);
tc.validate(errors, i);
}
}
for (PluginConfiguration pluginConfiguration : pluginConfigurations) {
pluginConfiguration.validate(errors, id);
}
}
示例2: validate
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* This method does a simple validate, it makes sure that all required fields have been filled in. It does not do
* any more complex operations such as validating that database tables exist or validating that named columns exist
*
* @param errors
* the errors
*/
public void validate(List<String> errors) {
if (!stringHasValue(id)) {
errors.add(getString("ValidationError.16")); //$NON-NLS-1$
}
if (jdbcConnectionConfiguration == null) {
errors.add(getString("ValidationError.10", id)); //$NON-NLS-1$
} else {
jdbcConnectionConfiguration.validate(errors);
}
if (javaModelGeneratorConfiguration == null) {
errors.add(getString("ValidationError.8", id)); //$NON-NLS-1$
} else {
javaModelGeneratorConfiguration.validate(errors, id);
}
if (javaClientGeneratorConfiguration != null) {
javaClientGeneratorConfiguration.validate(errors, id);
}
IntrospectedTable it = null;
try {
it = ObjectFactory.createIntrospectedTableForValidation(this);
} catch (Exception e) {
errors.add(getString("ValidationError.25", id)); //$NON-NLS-1$
}
if (it != null && it.requiresXMLGenerator()) {
if (sqlMapGeneratorConfiguration == null) {
errors.add(getString("ValidationError.9", id)); //$NON-NLS-1$
} else {
sqlMapGeneratorConfiguration.validate(errors, id);
}
}
if (tableConfigurations.size() == 0) {
errors.add(getString("ValidationError.3", id)); //$NON-NLS-1$
} else {
for (int i = 0; i < tableConfigurations.size(); i++) {
TableConfiguration tc = tableConfigurations.get(i);
tc.validate(errors, i);
}
}
for (PluginConfiguration pluginConfiguration : pluginConfigurations) {
pluginConfiguration.validate(errors, id);
}
}
示例3: validate
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* This method does a simple validate, it makes sure that all required
* fields have been filled in. It does not do any more complex operations
* such as validating that database tables exist or validating that named
* columns exist
*/
public void validate(List<String> errors) {
if (!stringHasValue(id)) {
errors.add(getString("ValidationError.16")); //$NON-NLS-1$
}
if (jdbcConnectionConfiguration == null) {
errors.add(getString("ValidationError.10", id)); //$NON-NLS-1$
}
else {
jdbcConnectionConfiguration.validate(errors);
}
if (javaModelGeneratorConfiguration == null) {
errors.add(getString("ValidationError.8", id)); //$NON-NLS-1$
}
else {
javaModelGeneratorConfiguration.validate(errors, id);
}
if (javaClientGeneratorConfiguration != null) {
javaClientGeneratorConfiguration.validate(errors, id);
}
IntrospectedTable it = null;
try {
it = ObjectFactory.createIntrospectedTableForValidation(this);
}
catch (Exception e) {
errors.add(getString("ValidationError.25", id)); //$NON-NLS-1$
}
if (it != null && it.requiresXMLGenerator()) {
if (sqlMapGeneratorConfiguration == null) {
errors.add(getString("ValidationError.9", id)); //$NON-NLS-1$
}
else {
sqlMapGeneratorConfiguration.validate(errors, id);
}
}
if (tableConfigurations.size() == 0) {
errors.add(getString("ValidationError.3", id)); //$NON-NLS-1$
}
else {
for (int i = 0; i < tableConfigurations.size(); i++) {
TableConfiguration tc = tableConfigurations.get(i);
tc.validate(errors, i);
}
}
for (PluginConfiguration pluginConfiguration : pluginConfigurations) {
pluginConfiguration.validate(errors, id);
}
}
示例4: validate
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* This method does a simple validate, it makes sure that all required
* fields have been filled in. It does not do any more complex operations
* such as validating that database tables exist or validating that named
* columns exist
*/
public void validate(List<String> errors) {
if (!stringHasValue(id)) {
errors.add(getString("ValidationError.16")); //$NON-NLS-1$
}
if (jdbcConnectionConfiguration == null) {
errors.add(getString("ValidationError.10", id)); //$NON-NLS-1$
} else {
jdbcConnectionConfiguration.validate(errors);
}
if (javaModelGeneratorConfiguration == null) {
errors.add(getString("ValidationError.8", id)); //$NON-NLS-1$
} else {
javaModelGeneratorConfiguration.validate(errors, id);
}
if (javaClientGeneratorConfiguration != null) {
javaClientGeneratorConfiguration.validate(errors, id);
}
IntrospectedTable it = null;
try {
it = ObjectFactory.createIntrospectedTableForValidation(this);
} catch (Exception e) {
errors.add(getString("ValidationError.25", id)); //$NON-NLS-1$
}
if (it != null && it.requiresXMLGenerator()) {
if (sqlMapGeneratorConfiguration == null) {
errors.add(getString("ValidationError.9", id)); //$NON-NLS-1$
} else {
sqlMapGeneratorConfiguration.validate(errors, id);
}
}
if (tableConfigurations.size() == 0) {
errors.add(getString("ValidationError.3", id)); //$NON-NLS-1$
} else {
for (int i = 0; i < tableConfigurations.size(); i++) {
TableConfiguration tc = tableConfigurations.get(i);
tc.validate(errors, i);
}
}
for (PluginConfiguration pluginConfiguration : pluginConfigurations) {
pluginConfiguration.validate(errors, id);
}
}