use of org.mybatis.generator.api.ConnectionFactory in project generator by mybatis.
the class ObjectFactory method createConnectionFactory.
public static ConnectionFactory createConnectionFactory(Context context) {
ConnectionFactoryConfiguration config = context.getConnectionFactoryConfiguration();
ConnectionFactory answer;
String type;
if (config == null || config.getConfigurationType() == null) {
type = JDBCConnectionFactory.class.getName();
} else {
type = config.getConfigurationType();
}
answer = (ConnectionFactory) createInternalObject(type);
if (config != null) {
answer.addConfigurationProperties(config.getProperties());
}
return answer;
}
Aggregations