Search in sources :

Example 1 with GenericSIDAOTemplate

use of org.mybatis.generator.codegen.ibatis2.dao.templates.GenericSIDAOTemplate in project generator by mybatis.

the class IntrospectedTableIbatis2Java2Impl method calculateDAOGenerators.

protected void calculateDAOGenerators(List<String> warnings, ProgressCallback progressCallback) {
    if (context.getJavaClientGeneratorConfiguration() == null) {
        return;
    }
    String type = context.getJavaClientGeneratorConfiguration().getConfigurationType();
    AbstractJavaGenerator javaGenerator;
    if ("IBATIS".equalsIgnoreCase(type)) {
        //$NON-NLS-1$
        javaGenerator = new DAOGenerator(new IbatisDAOTemplate(), isJava5Targeted());
    } else if ("SPRING".equalsIgnoreCase(type)) {
        //$NON-NLS-1$
        javaGenerator = new DAOGenerator(new SpringDAOTemplate(), isJava5Targeted());
    } else if ("GENERIC-CI".equalsIgnoreCase(type)) {
        //$NON-NLS-1$
        javaGenerator = new DAOGenerator(new GenericCIDAOTemplate(), isJava5Targeted());
    } else if ("GENERIC-SI".equalsIgnoreCase(type)) {
        //$NON-NLS-1$
        javaGenerator = new DAOGenerator(new GenericSIDAOTemplate(), isJava5Targeted());
    } else {
        javaGenerator = (AbstractJavaGenerator) ObjectFactory.createInternalObject(type);
    }
    initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
    daoGenerators.add(javaGenerator);
}
Also used : AbstractJavaGenerator(org.mybatis.generator.codegen.AbstractJavaGenerator) DAOGenerator(org.mybatis.generator.codegen.ibatis2.dao.DAOGenerator) IbatisDAOTemplate(org.mybatis.generator.codegen.ibatis2.dao.templates.IbatisDAOTemplate) GenericSIDAOTemplate(org.mybatis.generator.codegen.ibatis2.dao.templates.GenericSIDAOTemplate) GenericCIDAOTemplate(org.mybatis.generator.codegen.ibatis2.dao.templates.GenericCIDAOTemplate) SpringDAOTemplate(org.mybatis.generator.codegen.ibatis2.dao.templates.SpringDAOTemplate)

Aggregations

AbstractJavaGenerator (org.mybatis.generator.codegen.AbstractJavaGenerator)1 DAOGenerator (org.mybatis.generator.codegen.ibatis2.dao.DAOGenerator)1 GenericCIDAOTemplate (org.mybatis.generator.codegen.ibatis2.dao.templates.GenericCIDAOTemplate)1 GenericSIDAOTemplate (org.mybatis.generator.codegen.ibatis2.dao.templates.GenericSIDAOTemplate)1 IbatisDAOTemplate (org.mybatis.generator.codegen.ibatis2.dao.templates.IbatisDAOTemplate)1 SpringDAOTemplate (org.mybatis.generator.codegen.ibatis2.dao.templates.SpringDAOTemplate)1