use of org.mybatis.generator.codegen.ibatis2.dao.templates.SpringDAOTemplate 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);
}
Aggregations