<commit_before>/*		
 * Copyright 2013-5-24 The EGF Co., Ltd. 
 * site: http://www.egfit.com
 * file: $Id: org.eclipse.jdt.ui.prefs,DbFactoryImpl.java,fangj Exp$
 * created at:上午11:15:16
 */
package com.egf.db.core.db;

import com.egf.db.core.DbConstant;
import com.egf.db.core.config.SysConfigPropertyUtil;

/**
 * @author fangj
 * @version $Revision: 1.0 $
 * @since 1.0
 */
public class DbFactory {

	private static SysConfigPropertyUtil scpu = SysConfigPropertyUtil.getInstance();

	private DbFactory() {}

	public static DbInterface getDb() {
		String driverClass = scpu.getPropertyValue(DbConstant.JDBC_DRIVER_CLASS);
		if (driverClass == null) {
			return new DbH2Impl();
		} else {
			if (DbConstant.ORACLE_DRIVER_CLASS.equals(driverClass)) {
				return new DbOracleImpl();
			} else if (DbConstant.H2_DRIVER_CLASS.equals(driverClass)) {
				return new DbH2Impl();
			} else if (DbConstant.MTSQL_DRIVER_CLASS.equals(driverClass)) {
				return new DbMysqlImpl();
			} else {
				// 默认H2数据库
				return new DbH2Impl();
			}
		}
	}

}<commit_msg>增加了生产db2数据库接口实现<commit_after>/*		
 * Copyright 2013-5-24 The EGF Co., Ltd. 
 * site: http://www.egfit.com
 * file: $Id: org.eclipse.jdt.ui.prefs,DbFactoryImpl.java,fangj Exp$
 * created at:上午11:15:16
 */
package com.egf.db.core.db;

import com.egf.db.core.DbConstant;
import com.egf.db.core.config.SysConfigPropertyUtil;

/**
 * @author fangj
 * @version $Revision: 1.0 $
 * @since 1.0
 */
public class DbFactory {

	private static SysConfigPropertyUtil scpu = SysConfigPropertyUtil.getInstance();

	private DbFactory() {}

	public static DbInterface getDb() {
		String driverClass = scpu.getPropertyValue(DbConstant.JDBC_DRIVER_CLASS);
		if (driverClass == null) {
			return new DbH2Impl();
		} else {
			if (DbConstant.ORACLE_DRIVER_CLASS.equals(driverClass)) {
				return new DbOracleImpl();
			} else if (DbConstant.H2_DRIVER_CLASS.equals(driverClass)) {
				return new DbH2Impl();
			} else if (DbConstant.MYSQL_DRIVER_CLASS.equals(driverClass)) {
				return new DbMysqlImpl();
			} else if(DbConstant.DB2_DRIVER_CLASS.equals(driverClass)){
				return new DbDb2Impl();
			}else {
				// 默认H2数据库
				return new DbH2Impl();
			}
		}
	}

}
{'fraction_non_alphanumeric': 0.13287671232876713, 'fraction_numerical': 0.021461187214611873, 'mean_word_length': 3.901565995525727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6263839', 'n_tokens_mistral': 918, 'n_tokens_neox': 808, 'n_words': 153}