当前位置: 首页>>代码示例>>Java>>正文


Java ObjectFactory.createIntrospectedTableForValidation方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:64,代码来源:Context.java

示例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);
    }
}
 
开发者ID:backkoms,项目名称:mybatis-generator-comments,代码行数:58,代码来源:Context.java

示例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);
	}
}
 
开发者ID:handosme,项目名称:mybatis-generator-plus,代码行数:62,代码来源:Context.java

示例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);
	}
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:57,代码来源:Context.java


注:本文中的org.mybatis.generator.internal.ObjectFactory.createIntrospectedTableForValidation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。