1 20 25 package com.nilostep.xlsql.sql; 26 27 28 import java.sql.*; 29 30 import com.nilostep.xlsql.sql.hsqldb.*; 31 import com.nilostep.xlsql.sql.mckoi.*; 32 import com.nilostep.xlsql.sql.mysql.*; 33 34 35 40 public class xlSqlSelectFactory { 41 public static xlSqlSelect create(String type, Connection con) { 42 xlSqlSelect ret = null; 43 44 if (type.equals("hsqldb")) { 45 ret = new xlHsqldbSelect(con); 46 } else if (type.equals("mckoi")) { 47 ret = new xlMcKoiSelect(con); 48 } else if (type.equals("mysql")) { 49 ret = new xlMySQLSelect(con); 50 } else { 51 throw new IllegalArgumentException (); 52 } 53 54 return ret; 55 } 56 } | Popular Tags |