1 20 25 package com.nilostep.xlsql.sql; 26 27 import com.nilostep.xlsql.sql.hsqldb.*; 28 import com.nilostep.xlsql.sql.mckoi.*; 29 import com.nilostep.xlsql.sql.mysql.*; 30 31 import java.sql.*; 32 33 34 39 public class xlSqlWriterFactory { 40 47 public static xlSqlWriter create(String type) { 48 xlSqlWriter ret = null; 49 50 if (type.equals("hsqldb")) { 51 ret = new xlHsqldbWriter(); 52 } else if (type.equals("mckoi")) { 53 ret = new xlMcKoiWriter(); 54 } else if (type.equals("mysql")) { 55 ret = new xlMySQLWriter(); 56 } else { 57 throw new IllegalArgumentException (); 58 } 59 60 return ret; 61 } 62 } | Popular Tags |