所依赖的类
import java.sql.Connection;
import java.util.HashMap;
import java.util.Iterator;
/**
* The Class GridConnector.
*/
public class GridConnector extends BaseConnector {
/** The extra info , which need to be mixed in output */
protected StringBuffer extra_output = new StringBuffer();
/** The collections of options */
protected HashMap<String,BaseConnector> options = new HashMap<String,BaseConnector>();
/**
* Instantiates a new grid connector.
*
* @param db the db connection
*/
public GridConnector(Connection db){
this(db,DBType.Custom);
}
/**
* Instantiates a new grid connector.
*
* @param db the db connection
* @param db_type the db type
*/
public GridConnector(Connection db, DBType db_type){
this(db,db_type, new GridFactory());
}
/**
* Instantiates a new grid connector.
*
* @param db the db connection
* @param db_type the db type
* @param a_factory the class factory, which will be used by object
*/
public GridConnector(Connection db, DBType db_type, BaseFactory a_factory){
super(db,db_type,a_factory);
}
.....................
创建ic交易网本地数据库连接
Connection conn= null;
try {
//获得数据库连接
conn = ConnectionManager.getConnection();
//Dhtmlx连接
GridConnector c = new GridConnector(conn,DBType.MSSQL);
DHTMLX支持当前主流的数据库
* The Enum DBType.
*
* Stores supported DB types
*/
public enum DBType {
/** The Common SQL. */
SQL,
/** The MySql. */
MySQL,
/** The Oracle. */
Oracle,
/** The MSSQL. */
MSSQL,
/** The PostgreSql. */
PostgreSQL,
/** The Custom DB type ( will be defined by class factory ) */
Custom
}