1 30 31 32 package org.hsqldb.util; 33 34 38 39 class HelperFactory { 41 42 HelperFactory() {} 43 44 static TransferHelper getHelper(String productLowerName) { 46 47 TransferHelper f = null; 48 49 if (productLowerName.indexOf("hsql database") != -1) { 50 f = new HsqldbTransferHelper(); 51 } else if (productLowerName.indexOf("postgresql") != -1) { 52 f = new PostgresTransferHelper(); 53 } else if (productLowerName.indexOf("mckoi") != -1) { 54 f = new McKoiTransferHelper(); 55 } else if (productLowerName.indexOf("informix") != -1) { 56 f = new InformixTransferHelper(); 57 } else if (productLowerName.indexOf("oracle") != -1) { 58 System.out.println("using the Oracle helper"); 59 60 f = new OracleTransferHelper(); 61 } else if (productLowerName.equals("access") 62 || (productLowerName.indexOf("microsoft") != -1)) { 63 f = new SqlServerTransferHelper(); 64 } else { 65 f = new TransferHelper(); 66 } 67 68 return (f); 69 } 70 } 71 | Popular Tags |